Repository navigation
CI: use the com_bfstop branch of the same name only if it is ahead of main - #244
Merged
Merged
Conversation
…ahead of main The integration jobs check out the other repository (com_bfstop / bfstop) at the branch with the name of the PR branch if one exists, else main. A branch which was merged and not deleted still exists, but is a stale copy of an old main: the next PR with that name was tested against it (bfstop#241 against com_bfstop's merged pin-actions branch, which lacked #21). Now the branch is used only if it has commits main hasn't (GitHub compare API); a failing API call fails the step instead of silently using main. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LhhhdjhErC9ZiaS4HyRjsh
codeling
added a commit
that referenced
this pull request
Oct 25, 2026
Conflict in the "Determine com_bfstop branch" area of ci.yml (#244 changed the step, this branch pins the checkout action after it): both are kept. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LhhhdjhErC9ZiaS4HyRjsh
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
The integration jobs check out com_bfstop at the branch with the name of the PR branch if one exists, else
main(so a change spanning both repositories is tested together). A branch that was merged and not deleted still exists, but is a stale copy of an oldmain: the next PR with that name is tested against it. That is what happened to #241 (pin-actions): com_bfstop's mergedpin-actionsbranch predates com_bfstop#21, so the jobs ran against the old component and failed onComponentTest::testEntriesOfTheEditFormsAreStoredInCanonicalForm, even after #21 was merged.Change
The "Determine com_bfstop branch" step uses the same-named branch only if it has commits
maindoesn't (gh api repos/codeling/com_bfstop/compare/main...$branch --jq .ahead_by> 0). A merged branch (ahead by 0) falls back tomain, deleted or not.^[A-Za-z0-9._/-]+$before they go into the API path; anything else usesmain.main.tests/README.md. The mirror step in com_bfstop's workflow gets the same change (separate PR there).Tested
The step's script, extracted from the workflow, run against a local bare repository with a fake
gh(rev-list --count main..branch):mainmainmainmainmainNot run against the real GitHub API from here. The jobs of this PR are the first real run: this PR's branch exists in com_bfstop too (same name, ahead of main), so they should log
Using com_bfstop ci-ignore-merged-branches.Should make #241 pass on a re-run without anyone deleting com_bfstop's stale
pin-actionsbranch (once this is merged and #241 is updated withmain).Generated by Claude Code