Skip to content

ci: move title lint and preview cleanup off pull_request_target - #957

Merged
josephfusco merged 1 commit into
mainfrom
ci/move-off-pull-request-target
Nov 23, 2026
Merged

josephfusco merged 1 commit into
mainfrom
ci/move-off-pull-request-target

Conversation

@obenland

Copy link
Copy Markdown
Member

Related: GitHub's change to block pull_request_target by default in public repositories from December 2, 2026 (changelog).

Two of the three pull_request_target workflows here don't need it. Moving them off means they don't need an org-level allow rule. public-surface.yml and props-bot.yml still 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 needs statuses: write, but at the pinned SHA it only writes a commit status when wip is 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 lists preview-pr-* branches and tags, looks up each PR, and deletes the preview if the PR is closed. On forks, pull_request: closed gets a read-only token and can't delete refs, so a sweep is the only option that doesn't need pull_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 actionlint and zizmor --persona=regular locally.

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

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>
Copilot AI lite review requested due to automatic review settings November 18, 2026 16:34

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota.

@github-actions

github-actions Bot commented Nov 18, 2026 •

Copy link
Copy Markdown
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:

Props obenland, joefusco.

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.


Props Bot commands

You can trigger Props Bot actions by commenting on this PR:

  • @propsbot add <username> to give props to a GitHub or WordPress.org user. Requires write access.
  • @propsbot remove <username> to leave a user out of the props. Requires write access.
  • @propsbot refresh to refresh this list. Adding the props-bot label works too.

@github-actions github-actions Bot added the Needs Reply Someone outside the maintainers has waited over 48 hours for an answer label Nov 20, 2026

@josephfusco josephfusco left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Thank you!

@josephfusco
josephfusco merged commit 3db7eb4 into main Nov 23, 2026
41 checks passed
@josephfusco
josephfusco deleted the ci/move-off-pull-request-target branch November 23, 2026 15:46
@github-actions github-actions Bot added this to the 0.20.3 milestone Nov 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Needs Reply Someone outside the maintainers has waited over 48 hours for an answer

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants