Repository navigation
fix(cla): keep the CLA check running past the pull_request_target block, and sweep only deploy-branch runs (ENG-2046) - #78
Merged
Conversation
… pull_request_target
…the policy cause in the startup alert
hamishfagg
approved these changes
Nov 12, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
User story
As an outside contributor opening a pull request on a MindsDB public repository
I want the CLA check to start and ask me to sign after GitHub blocks
pull_request_targetby defaultSo that my contribution can be accepted
Why this matters
On 9 Nov, from 16:00 to 18:00 UTC, GitHub's first brownout of its
pull_request_targetblock refused every CLA run in our public repositories before it started. GitHub runs another brownout on 16 Nov and blocks the event for good on 2 Dec, unless an Actions event policy allows it.The same refusal set off the startup-failure sweep. The refused CLA run belonged to a release pull request whose head is
staging, and GitHub lists a pull request run under its head branch. So the sweep alerted three times thatstaging"is not deployed", whilestaginghad deployed from the same commit eight seconds earlier.What happens today
cla.ymltriggers onpull_request_targetandissue_comment, and the org has no Actions event policy.permissions:and YAML causes.What should happen
config/cla-actions-policy.jsonis an org Actions event policy. It allowspull_request_targetandissue_commentfor.github/workflows/cla.ymlin every repository, and names no other workflow. An org admin creates it with thegh apicalls in the README, since the Terraform GitHub provider has no resource for it yet.push,schedule,workflow_dispatch,workflow_runandrepository_dispatch. They filter before picking each workflow's newest run, so a later pull request run can't hide a red push.permissions:or YAML on that ref, or an Actions policy.Test plan
cla.ymlalone:tests/test_cla_actions_policy.pypins its target and events. The live policy is checked once it's created.staging: the startup sweep reports nothing, and apushthat never started is still reported. The tests fail onmainand pass here.staging, still reports a redpush, and a later pull request run doesn't hide it. The tests fail onmainand pass here.TestMessagerenders the real payload.pull_request_targetworkflow stays under GitHub's default block: checked with a scratch repository after the policy is created. Not checked yet.cla.ymlchanges: none does.