Skip to content

Commit 6cfdd27

Browse files
author
Matthew
committed
ci: say which busbar branch we mean, instead of '<number>/merge'
On a pull_request event `github.ref_name` is '<number>/merge', not a branch name, so plugin-ci asked GetBusbar/busbar for a branch called '5/merge' and the sibling checkout died with 'The process /usr/bin/git failed with exit code 1', naming neither the ref nor the reason. Every pull request to this repo has been red on that before running a line of the change it was testing. `github.base_ref` is the branch the PR targets and is empty on a push, so this means dev-against-dev and main-against-main as intended on both events. plugin-ci.yml also now falls back with a loud warning when a ref cannot be resolved, so this is belt and braces - but a caller should say what it means rather than lean on a fallback.
1 parent 0002c6f commit 6cfdd27

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

.github/workflows/ci.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,10 @@ jobs:
1818
plugin_crate: busbar-auth-ldap-plugin
1919
plugin_kind: auth
2020
plugin_alias: ldap
21-
busbar_ref: ${{ github.ref_name }} # same-branch: qa builds core qa, dev builds core dev (no stale main/tag)
21+
busbar_ref: ${{ github.base_ref || github.ref_name }}
22+
# base_ref FIRST: on a pull_request `github.ref_name` is '<number>/merge', not a branch
23+
# name, so this asked busbar for a branch called '5/merge' and the sibling checkout died
24+
# with an unreadable git error on EVERY pull request to this repo. # same-branch: qa builds core qa, dev builds core dev (no stale main/tag)
2225
# OpenLDAP service container for the live credential-form e2e (tests/e2e.rs): the plugin binds
2326
# alice against it, reads her group DN, mints a key; a wrong password is asserted 401.
2427
service: openldap

0 commit comments

Comments
 (0)