slachiewicz commented on issue #11858:
URL: https://github.com/apache/maven/issues/11858#issuecomment-5451777010
Follow-up — correcting two things from my comment above after digging into
`.asf.yaml`:
1. **"Automatically delete head branches" is already enabled** ✅ — no admin
action needed. `.asf.yaml` on `master` already contains the current-syntax
setting:
```yaml
github:
pull_requests:
del_branch_on_merge: true
```
(verified against ASF Infra's parser in `apache/infrastructure-asfyaml` —
`github.pull_requests.del_branch_on_merge` is the *current* location; the old
top-level `github.del_branch_on_merge` is legacy and must **not** be added
alongside it.)
So why do stale branches accumulate? GitHub only auto-deletes the head
branch of **merged** PRs. Branches from **closed-unmerged PRs** (like #862,
#833, #1095) and branches that **never had a PR** persist indefinitely — that's
exactly the residue this issue is cleaning up, and exactly what the monthly
report workflow in PR #12886 is designed to catch.
2. **`pre-reset-master` should *not* be deleted** — it is listed in
`protected_branches` in `.asf.yaml`, so it's protected deliberately (presumably
as a pre-history-reset backup). Retracting it from my delete-candidate list; if
the team ever wants it gone, the protection entry must be removed first (and
even then it's arguably worth keeping as a tagged archive).
Net: PR #12886 (monthly stale-branch report) is the durable fix for the
remaining residue class. The 6 branches deleted since March plus today's 4 are
solid progress. 🎉
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]