Allow GitLab EasyCLA status comment on MRs from forked repos#5053
Conversation
Signed-off-by: Lukasz Gryglicki <lgryglicki@cncf.io> Assisted by [OpenAI](https://platform.openai.com/) Assisted by [GitHub Copilot](https://github.com/features/copilot) Assisted by [Claude](https://claude.ai)
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Pull request overview
This PR makes the GitLab EasyCLA flow resilient to fork-based merge requests. Previously, when a webhook fired for an MR opened from a fork, SetCommitStatus could return a 404 because the commit SHA only exists in the fork's refs (not the upstream project the webhook targets), and the early return prevented the MR comment (containing the sign URL) from ever being posted. Now status failures are logged as warnings and the flow continues so the contributor still gets the comment with the sign URL.
Changes:
- Stop returning early when
SetCommitStatusfails in both the missing-users and signed paths. - Refactor the success path to use an
if-with-init style consistent with the failure path. - Add an explanatory comment about the fork/404 scenario.
Signed-off-by: Lukasz Gryglicki lgryglicki@cncf.io
Assisted by OpenAI
Assisted by GitHub Copilot
Assisted by Claude