Repository navigation
ci: move title lint and preview cleanup off pull_request_target - #957
Merged
Merged
Conversation
GitHub blocks `pull_request_target` by default in public repositories from December 2, 2026. Neither workflow needs it. The title check only writes a commit status when `wip` is enabled, which it isn't, so `pull_request` with a read-only token is enough. Preview cleanup becomes a scheduled sweep that deletes the preview branch, and any legacy release and tag, of every closed pull request. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
|
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. Core Committers: Use this line as a base for the props when committing in SVN: To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. Props Bot commandsYou can trigger Props Bot actions by commenting on this PR:
|
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.
Related: GitHub's change to block
pull_request_targetby default in public repositories from December 2, 2026 (changelog).Two of the three
pull_request_targetworkflows here don't need it. Moving them off means they don't need an org-level allow rule.public-surface.ymlandprops-bot.ymlstill need to label and comment on fork PRs, so they stay as they are.lint-pr.yml:pull_request_target→pull_request. The job comment said the semantic PR action needsstatuses: write, but at the pinned SHA it only writes a commit status whenwipis enabled (source), and it isn't enabled here. Otherwise it just passes or fails the job, which works with a read-only token on forks. The check name,Validate pull request title, is unchanged.The trade-off: fork PRs from first-time contributors now wait for a maintainer to approve the workflow run before the title check runs.
playground-preview-cleanup.yml: PR close → scheduled sweep. Every six hours (and on demand), it listspreview-pr-*branches and tags, looks up each PR, and deletes the preview if the PR is closed. On forks,pull_request: closedgets a read-only token and can't delete refs, so a sweep is the only option that doesn't needpull_request_target. Nothing reads a closed PR's preview, so the delay doesn't matter.A dry run against the repo today shows the current workflow missed a few: it would delete the legacy releases and tags for #30, #51, #52, #61, #189 and #195, plus the branch for #724, and keep the four previews of open PRs.
Both files pass
actionlintandzizmor --persona=regularlocally.Use of AI Tools
AI assistance: Yes
Tool(s): Claude Code
Model(s): Claude Opus 5.5
Used for: Auditing the workflows, writing the changes and this description; reviewed by me.
🤖 Generated with Claude Code