Skip to content

fix(cla): forward status to PR head commit#2

Closed
coopbri wants to merge 1 commit intomasterfrom
fix/cla-status-forwarding
Closed

fix(cla): forward status to PR head commit#2
coopbri wants to merge 1 commit intomasterfrom
fix/cla-status-forwarding

Conversation

@coopbri
Copy link
Contributor

@coopbri coopbri commented Mar 23, 2026

Summary

  • Forward CLA check outcome (success/failure) to the PR head SHA after the CLA action runs
  • Add workflow_call to job/step if conditions for reusable workflow compatibility

Problem

pull_request_target workflows run against the base branch SHA. The CLA action's check run and any status it posts land on that base SHA, not the PR head commit. When an org-level ruleset requires cla / cla on the PR head (like the "CLA Required" ruleset), the check stays stuck on "expected" indefinitely.

This affects all repos in the org that use this reusable CLA workflow.

Fix

A new step runs after the CLA action (if: always()) and posts a commit status to github.event.pull_request.head.sha with the correct outcome. The if guard on github.event.pull_request.head.sha ensures it only runs for PR events, not issue comments.

Test plan

  • Verify on an existing PR (e.g. feature(release): version packages rdk#80) that the cla / cla check appears on the PR head after merge
  • Confirm unsigned CLA correctly shows failure status on PR head
  • Confirm issue_comment (recheck / signing) path still works

`pull_request_target` runs against the base branch SHA, so the
check run and any status the CLA action posts land on the wrong
commit. This causes org-level required-check rulesets (like "CLA
Required") to stay stuck on "expected" because GitHub never sees
the `cla / cla` context on the actual PR head.

Add a step that explicitly posts the CLA outcome (success or
failure) to `github.event.pull_request.head.sha` after the CLA
action runs. Also add `workflow_call` to the job/step conditions
so the workflow works correctly when invoked as a reusable workflow.
@coopbri coopbri closed this Mar 23, 2026
@github-actions github-actions bot locked and limited conversation to collaborators Mar 23, 2026
@coopbri coopbri deleted the fix/cla-status-forwarding branch March 23, 2026 20:04
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant