CI: Flag issue mentions that are not linked in the Development field#77396
CI: Flag issue mentions that are not linked in the Development field#77396adamsilverstein wants to merge 2 commits intotrunkfrom
Conversation
Add a non-invasive pull_request_target workflow that parses the PR body for issue references (#N, GH-N, issue URLs), compares them against the PR's closingIssuesReferences via GraphQL, and posts or updates a sticky comment listing any referenced issues that aren't surfaced in the Development sidebar. The comment suggests using a closing keyword or manually linking the issue so release leads and release-note writers can find every PR attached to a ticket. The check is advisory and does not fail the PR.
|
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message. To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
|
Flaky tests detected in 9d4fe16. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/24481862957
|
What?
Closes #77397
Adds a new advisory CI workflow,
check-linked-issues.yml, that scans every open PR's description for issue references (#1234,GH-1234, or full issue URLs) and compares them against the PR's Development relationship (GraphQLclosingIssuesReferences). If any referenced issue isn't linked, the workflow posts or updates a sticky comment explaining how to link it.Why?
Based on Amy's feedback: anything included in a release should be linked (not just mentioned) in the PR description so that it shows up in the Development section on the right sidebar of the related ticket. Today, tracking tickets like the per-release editor tasks ticket rely on release leads manually following every comment and every PR mentioned in every tracker to figure out what belongs in the release — and things still slip through. Surfacing the relationship in the sidebar lets release leads and release-note writers find every PR attached to a ticket at a glance.
The check is intentionally non-invasive:
A more aggressive variant (auto-appending a bot-managed
Closes #Nblock to the PR body) was considered but not chosen, because closing keywords also auto-close the referenced issue on merge — which is wrong for informational references. A future iteration can layer automatic linking on top of this check if desired.How?
.github/workflows/check-linked-issues.yml.pull_request_target(opened,edited,reopened,synchronize,ready_for_review) so it reacts to description edits.actions/github-scriptto:Closes <!-- #ISSUE-NUMBER -->placeholder in the PR template).#N,GH-N, and in-repo issue/pull URLs.closingIssuesReferencesto determine which are already linked via the Development field.GITHUB_TOKENwith scopedpull-requests: writepermission. No additional secrets required.WordPress/gutenbergand open PRs only.Testing Instructions
See #100).Closes #100(or manually link the issue from the Development sidebar).Follow-ups
exit_type: failure) after a grace period.