ci: match dependency branch by head_ref on pull_request events (lib-tests)#94
Merged
Merged
Conversation
…ests) lib-tests.yml computed the dependency-branch as `github.ref_name`, which on pull_request events is the PR merge ref (e.g. `1395/merge`), not the source branch — so it never found the matching sibling branch and fell back to each dep's main. This breaks coordinated cross-repo PRs (e.g. a library that pins a renamed dependency present only on the sibling branch). Use `github.head_ref || github.ref_name`, matching docs-build.yml and smoke-tests.yml, which already do this. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013ciVftxvYpefh59wSkR7jN
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.
What
lib-tests.ymlcomputed the dependency branch asgithub.ref_name, which onpull_requestevents is the PR merge ref (e.g.1395/merge), not the source branch. So it never found the matching sibling branch and fell back to each dependency'smain. Usegithub.head_ref || github.ref_name— matchingdocs-build.ymlandsmoke-tests.yml, which already do this.Why
Breaks coordinated cross-repo PRs: e.g. a library PR that pins a renamed dependency (
autonerves) present only on the sibling PyAutoConf branch — the PR-context run cloned PyAutoConfmain(stillautoconf) and failed to resolveautonerves. Push runs already passed (they useref_namecorrectly); this makes the PR runs correct too.🤖 Generated with Claude Code
https://claude.ai/code/session_013ciVftxvYpefh59wSkR7jN
Generated by Claude Code