Repository navigation
chore(ci): isolate privileged docs automation from pr events - #3075
Conversation
Public PR automation loses its default event allowance on 2 December. A read-only metadata relay keeps fork and conflicted PR events available while port and Linear jobs consume verified workflow_run metadata.
✅ Deploy Preview for vcluster-docs-site ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
Thanks for this. The design looks sound, and I checked two things that could have broken our docs flows:
Before this merges, a few concerns:
|
Docs automation still needed a privileged event policy exception because its metadata relay used a privileged PR trigger. A fork could also replay another repository head without a repository identity check. Resolve current PR state through the API in trusted default-branch consumers, bind each signal to its head repository, branch and commit, and keep credentials out of signal runs. Docs needs open PRs and nondefault base branches that the shared resolver does not support. Serialize follow-up creation and recognize prior bot links to avoid duplicate issues on replay. Closes DEVOPS-1803
|
The isolation design looks good. I checked that dropping the full checkout and the 1. Ports re-run on every signal after merge (blocking). The resolver always gives a merged PR the action
Could the consumers call the port actions only for the original 2. More duplicate Linear comments. 3. Minor.
Before merge, it's worth running the live check of adding a |
A failed resolver checkout stops backports before the existing alert condition can see a failure. Alert on any prior job failure and exercise the generated Node preload options in the bridge test.
Edits and unrelated labels on merged pull requests retrigger every port because the resolver treats each signal as a close event. Carry the signal as an untrusted hint and verify current labels before invoking a port.
Busy pull requests can receive repeated Linear links because the shared commenter only examines the first page. Read every comment page before creating any links so repeated signals remain safe.
djwfyi
left a comment
There was a problem hiding this comment.
This looks good to merge to me, but only after we get 5.0 docs released. So after 19 Nov 2026.
Content description
Replace
pull_request_targetworkflows with an unprivileged PR signal and four trustedworkflow_runconsumers. Before port or Linear actions, the consumers use the GitHub API to resolve and validate current PR state.The signal has
permissions: {}and runs on opened, edited, labeled, closed, reopened, and synchronize events. Consumers check out only the local resolver at the default workflow revision, without persisted credentials. The resolver validates the run attempt, workflow, repository, and PR head repository, branch, SHA, and base. Each resolution is capped at 30 API calls, 10 candidates, and three comment pages.Ports require a merged PR. Linear comments require
mainand exclude Dependabot. Current labels control port and follow-up actions. Follow-up creation checks trusted bot markers and exact legacy Linear URLs and serializes by PR head. Backport alerts cover resolver failures. Nopull_request_targetreferences remain under.github.The shared resolver in loft-sh/github-actions#349 supports merged PRs targeting the default branch. Docs also needs open PRs and ports to other base branches. This PR uses a local resolver with the same head repository check; consolidating that logic needs a broader shared contract. No unreleased resolver tag is referenced.
Validation:
npm ci.npm run validate-glossary, actionlint on changed workflows, offline zizmor on changed workflows and the action, andgit diff --checkpassed. Zizmor reported zero findings and zero dangerous triggers for the changed files.issue_commentdangerous trigger inclaude.yml. Those files are unchanged.Rollout needs live branch, fork, merged PR, and Linear acceptance checks. The signal must reach
nextand other target branches. GitHub fork approvals and conflicted PR restrictions may affect runs. Linear issue creation and its marker write are not atomic. A failure between them can leave an issue without a marker.Preview link
No page changes.
Internal reference
Closes DEVOPS-1803
AI review: mention
@claudein a comment to request a review. Claude reads the PR and posts review comments. See CONTRIBUTING.md for example commands.@netlify /docs