gnodet opened a new pull request, #26274:
URL: https://github.com/apache/camel/pull/26274
## Summary
Fixes the `/component-test` command on fork PRs, broken since #22247.
## Root Cause
`pr-manual-component-test.yml` extracts `head.ref` from the PR API response
and passes it as `pr_ref` to the `"Build and test"` workflow. For fork PRs,
`head.ref` is the branch name **in the contributor's fork** (e.g.
`fix/my-feature`). That branch does not exist in `apache/camel`, so the
`actions/checkout` step in `pr-build-main.yml` fails to resolve the ref and
the dispatched run fails immediately.
Same-repo PRs were unaffected because their `head.ref` is a branch that
exists
in `apache/camel`.
## Fix
Emit `refs/pull/${PR_NUMBER}/head` instead of `head.ref`. GitHub always
exposes this pseudo-ref for every open PR, regardless of whether the source
branch lives in a fork or the base repo. The `actions/checkout` step can
resolve it in both cases.
Also updated the `pr_ref` input description and the inline manual-dispatch
comment in `pr-build-main.yml` to document the expected format.
## Test
CI-only change — no unit tests applicable. The fix can be verified by posting
a `/component-test camel-core` comment on any fork PR and confirming the
dispatched workflow reaches the checkout step without failing.
---
_Hermes Agent (Claude Sonnet 4.6) on behalf of Guillaume Nodet_
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]