Repository navigation
Run the CLA check without pull_request_target - #227
Conversation
GitHub blocks pull_request_target by default in public repositories without an Actions event policy. A secret-free CLA trigger workflow runs on pull_request; when it completes, the CLA workflow runs from main on workflow_run and sets a cla commit status on the pull request's head.
Dependabot's runs may not get the App secret. Its trigger job is named cla and passes, as the skipped cla job did before, and the CLA workflow skips those runs.
There was a problem hiding this comment.
🟡 Changes recommended
The licensing documentation still misidentifies the workflow result as authoritative instead of directing maintainers to the cla status and .cla.json, leaving an active clarity issue.
1 open issue
What changed in this PR
This PR moves the CLA check off pull_request_target, which GitHub is blocking by default in public repositories. A secret-free CLA trigger workflow runs on pull_request. When it completes, the CLA workflow runs from main with the App token, finds the open pull request for that commit, and sets a cla commit status. Comment-based signing updates the same status, so the workflow no longer needs actions: write. The action is pinned to the fork commit 82b776f.
Changes:
- Adds
cla-trigger.yml, which runs onpull_requestwith no permissions or secrets. Its job is namedclafor Dependabot runs so those PRs pass. - Changes
cla.ymlto run onworkflow_runand comments, usesstatuses: write, and passes the trigger commit SHA ashead-sha. - Updates
docs/licensing.mdto describe the new flow.
| File | Description |
|---|---|
| docs/licensing.md | Describes the trigger, status-based result, and which result is authoritative. |
| .github/workflows/cla.yml | Switches from pull_request_target to workflow_run and comments, narrows permissions, and pins the action to 82b776f. |
| .github/workflows/cla-trigger.yml | New secret-free pull_request workflow that starts the CLA workflow on completion. |
Review effort: Lite
|
All contributors have signed the CLA ✍️ ✅ |

GitHub now blocks
pull_request_targetby default in public repositories without an Actions event policy, and the block becomes permanent on December 2, 2026. This moves the CLA check off it, using the status mode added in openwatersio/cla-github-action#5.pull_requestwith no permissions or secrets and does nothing. When it completes, it starts the CLA workflow.workflow_runand on comments, frommain, with the App token as before. It finds the open pull request whose head is the triggering commit through the API and sets aclacommit status on it. Signing by comment updates that status directly, so the workflow no longer needsactions: write; it needsstatuses: writeinstead.GITHUB_TOKEN, so its source is GitHub Actions. No ruleset here requirescla, so the status shows on pull requests without blocking them.claand passes, which is what the skippedclajob did before, and the CLA workflow skips them.The action is pinned to
f07dfd3, the merge commit of openwatersio/cla-github-action#5.Limitations
pull_requestruns from some first-time contributors wait for a maintainer to approve them, and GitHub runs nopull_requestworkflow while a pull request has merge conflicts. The CLA comment and status wait for those. Arecheckcomment runs the check without them.pull_request, so a pull request can add a passing job namedcla. That was possible before too. Run the CLA check without pull_request_target cla-github-action#5 describes how to close it by having the CLA App post the status, which needs App and ruleset settings changes.clacheck run. Push a new commit to them to get the new status.pull_request_targetrun ofmain's CLA workflow on this pull request, so it gets noclaresult.Testing
Not yet run end to end.
workflow_runandissue_commentonly run workflows that are onmain, so the first real run comes after this merges.After merge
main, and aclastatus lands on the head.clastatus, sign by comment, and check the status turns green.cla.Review
One local round of Claude Opus and Sonnet on the water-levels copy of these workflows; the other repositories carry the same diff. Both flagged that Dependabot runs may not get the App secret and so would never get a
clastatus. That is fixed by the Dependabot-named trigger job. They also asked whether signing by comment updates the status; the action does this, and its tests cover it. The other findings, first-time approval, merge conflicts and spoofableclajobs, are listed above. The action itself had three review rounds, described in openwatersio/cla-github-action#5.