Close duplicate pull requests when an issue is fixed #18472

Merged
florian-lefebvre opened 5:46am on October 21, 2026 wanted to merge 277 Ξ” into withastro/astro main from
florian-lefebvre/Auto-close-duplicated-PRs
Code line content in this commit was purged after it aged past our code retention window of two weeks for this repo. We have insufficient quota to grab the code content at this time, please try back later.

If you receive this message over several days, please consider adding more users to your account (whose quota we can use to grab commit content), or contact [email protected] with error #33NFNE
Diff Delta:
277
About 18 Diff Delta/hour
Classified as:  Bug Fix

florian-lefebvre's Description of Work

Changes

Tries to make our life easier when it comes to PRs:


  • Adds a workflow that closes open pull requests when another pull request fixes every issue they close.

  • Runs after a merge and on a weekly sweep, so duplicates opened before this workflow are cleaned up too.

  • Skips drafts, pull requests from maintainers, and pull requests that also fix issues the merged change does not.

  • Comments with the merged fix and a path to reopen.

Testing


  • Ran the merge handler against #18419, which closed the duplicate #18358.

  • Ran the sweep against the live repository, which found #18064, #18324, #18338, #18358, and #18369.

  • Exercised pagination, deleted authors, reopened issues, partial supersets, permission failures, and state races with a stub harness.


  • zizmor --min-severity high --min-confidence high reports no findings.

  • Biome and Prettier checks pass.

Docs

No documentation changes. This is repository automation.

AI was used to write this change.

2 total changed files
Loading changes...
Loading changes...
PR terminus reached:
You have reached the final β€œwhy is this here?”