Skip to content

Run the CLA check without pull_request_target - #227

Merged
bkeepers merged 4 commits into
mainfrom
claude/cla-workflow-run
Nov 10, 2026
Merged

bkeepers merged 4 commits into
mainfrom
claude/cla-workflow-run

Conversation

@bkeepers

@bkeepers bkeepers commented Nov 9, 2026 •

Copy link
Copy Markdown
Member

GitHub now blocks pull_request_target by 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.

  • .github/workflows/cla-trigger.yml runs on pull_request with no permissions or secrets and does nothing. When it completes, it starts the CLA workflow.
  • .github/workflows/cla.yml runs on workflow_run and on comments, from main, with the App token as before. It finds the open pull request whose head is the triggering commit through the API and sets a cla commit status on it. Signing by comment updates that status directly, so the workflow no longer needs actions: write; it needs statuses: write instead.
  • The status is created with GITHUB_TOKEN, so its source is GitHub Actions. No ruleset here requires cla, so the status shows on pull requests without blocking them.
  • Dependabot's runs may not get the App secret. On those runs the trigger job is named cla and passes, which is what the skipped cla job did before, and the CLA workflow skips them.
  • docs/licensing.md describes the new flow.

The action is pinned to f07dfd3, the merge commit of openwatersio/cla-github-action#5.

Limitations

  • pull_request runs from some first-time contributors wait for a maintainer to approve them, and GitHub runs no pull_request workflow while a pull request has merge conflicts. The CLA comment and status wait for those. A recheck comment runs the check without them.
  • A pull request's own workflow files run on pull_request, so a pull request can add a passing job named cla. 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.
  • Pull requests opened before this merges keep their old cla check run. Push a new commit to them to get the new status.
  • GitHub is blocking the pull_request_target run of main's CLA workflow on this pull request, so it gets no cla result.

Testing

Not yet run end to end. workflow_run and issue_comment only run workflows that are on main, so the first real run comes after this merges.

After merge

  • Check the first CLA run on a pull request: the trigger completes, the CLA workflow runs from main, and a cla status lands on the head.
  • Open a test pull request from a fork, check the bot comment and a failing cla status, sign by comment, and check the status turns green.
  • Check that the next Dependabot pull request shows a passing 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 cla status. 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 spoofable cla jobs, are listed above. The action itself had three review rounds, described in openwatersio/cla-github-action#5.

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.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 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 on pull_request with no permissions or secrets. Its job is named cla for Dependabot runs so those PRs pass.
  • Changes cla.yml to run on workflow_run and comments, uses statuses: write, and passes the trigger commit SHA as head-sha.
  • Updates docs/licensing.md to 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

Comment thread docs/licensing.md Resolved
@github-actions

github-actions Bot commented Nov 9, 2026

Copy link
Copy Markdown
Contributor

All contributors have signed the CLA ✍️ ✅
Posted by the CLA Assistant Lite bot.

@bkeepers
bkeepers merged commit 4f2bf75 into main Nov 10, 2026
4 checks passed
@bkeepers
bkeepers deleted the claude/cla-workflow-run branch November 10, 2026 22:36
@github-project-automation github-project-automation Bot moved this from Todo to Done in Roadmap Nov 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants