redline: take forge's dispatch from the default branch - #103
Conversation
redline.yml gains workflow_dispatch (pr, head, reread) and pins askalf/ci c70746c, the commit with redline-review.yml's dispatch mode. The trigger and the pin move together: new inputs passed to an older pin are an invalid-input error. Forge dispatches this on the default branch for a head the pull_request run cannot vouch for: a PR that changes CI, a verdict forge refused, a re-read after a description edit. It finds the run by its title. A dispatch is queued, never cancelled.
A concurrency group holds one pending run, and a newer run cancels it. So one group per PR let a second dispatch cancel a first that was still waiting, leaving forge a run with no verdict. Each dispatch is now keyed on its head and re-read flag.
sprayberry-redline
left a comment
There was a problem hiding this comment.
Approve. The caller adds the workflow_dispatch entry point and moves the pin to the commit that accepts pr, head and reread, and both paths hold.
On pull_request the new with: values resolve to empty (pr, head) and false (reread: ${{ inputs.reread == true }}), so the called workflow's inputs.pr != '' guard keeps the existing same-repo, non-draft path. The review / redline run at this head shows that path working against the new pin. On dispatch, the caller-side if lets the job through, and redline-review.yml at c70746c refuses anything other than a workflow_dispatch on the default branch for an open, non-draft, same-repo PR at exactly the given sha before it fetches anything. The pin is on askalf/ci main (compare returns identical), and uses: and redline-ref name the same sha. The concurrency change keeps cancel-on-push for pull_request (redline-pull_request-<n>, since inputs.head is empty there) and gives each dispatch its own non-cancelling group keyed on head and re-read flag. So a re-read queued behind a first read of the same head is no longer replaced.
Same change as askalf/ci#5.
redline.ymltakes theworkflow_dispatchtrigger from askalf/ci#4, and its pin moves toc70746c; the trigger and the pin must move together.Forge then dispatches Redline on the default branch for a head the pull_request run cannot vouch for: a PR that changes CI definitions, a verdict forge refused, or a re-read after a description edit. That run executes the default branch's workflow files, not the PR's. Forge finds it by the title
Redline review askalf/<repo>#<pr> @ <head>. Nothing is dispatched until the forge side (askalf/platform#1531) is deployed with the repo listed. Fork PRs are unchanged.actionlint is clean.
pin.mjsstill bumps only the two pin lines.