ci: fix plugin checkout for fork pull requests #245
No Reviewers
Labels
Clear labels
issue::not confirmed
issue::not reproducible
issue::reproducible
priority::critical
priority::needed
priority::nice to have
scope::backend
scope::frontend
stage::in development
stage::on hold
stage::pre_release
stage::ready for review
stage::selected for development
stage::weekly backlog
type::bug
type::discussion
type::doc
type::feature
type::improvement
type::test
bug
duplicate
enhancement
help wanted
invalid
question
wontfix
Used if an issue has not yet been confirmed by a developer
Used if an issue is not reproducible
Used if a developer was able to reproduce the issue
Should be done as soon as possible
An important update to the code base
Not really needed but a good improvement
An issue regarding the backend services
An issue regarding the user-facing services
This issue is currently being worked on
Something is blocking the development
For issues that have been merged into a pre-release branch and are waiting for their release.
For issues that have been resolved and are ready for review
This issue has been selected for development but has not been scheduled yet
This issue has been selected for development for the next development cycle
It's a bug!
A discussion is wanted/needed
Improvements to the documentation
A new feature
Neither a feature nor a bug but an improvement to the code base
Missing tests or improvements to the test suite
Something is not working
This issue or pull request already exists
New feature
Need some help
Something is wrong
More information is needed
This won't be fixed
No labels
Milestone
No items
No Milestone
Projects
Clear projects
No projects
Assignees
acerbo_a (acerbo_a)
appel_c (appel_c)
bec-gitea
celcer_t (celcer_t)
debenjak_l (debenjak_l)
diaz (diaz)
divall_e (divall_e)
guizar_m (guizar_m)
haghta_s (haghta_s)
holler (holler)
lombosi_c (lombosi_c)
menzel (menzel)
perl_d (perl_d)
usov_i (usov_i)
wakonig_k (wakonig_k)
wang_x1 (wang_x1)
wyzula_j (wyzula_j)
zamofing_t (zamofing_t)
Clear assignees
No Assignees
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: bec/csaxs_bec#245
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Problem: the test job's Checkout BEC Plugin Repository step pins the repository to bec/csaxs_bec and uses the head_ref context for the ref. For a pull request opened from a fork, head_ref is the fork's branch name, which does not exist in the base repo, so the checkout fails with git exit code 1 (shown as Failure - Main Checkout BEC Plugin Repository) before any tests run. This makes every fork PR red regardless of its content, e.g. #243.
Fix: drop the head_ref term so the expression falls through to the sha context. On pull_request events that is the test-merge commit, which lives in the base repo, so the checkout succeeds for fork PRs and in-repo branches alike, and CI gates on the merged result. The BEC_PLUGIN_REPO_BRANCH workflow_dispatch override is unchanged.
After merge: because pull_request runs the workflow from the merged tree, existing fork PRs such as #243 need an Update Branch / re-run to regenerate the merge ref and pick up the fixed workflow.