From ad34735e68ce63be93007c9e6b4f751c2ff8e3c9 Mon Sep 17 00:00:00 2001 From: Adam Getchell Date: Sat, 24 Oct 2026 20:17:23 -0700 Subject: [PATCH] ci: automatically delete merged pull request branches --- .github/settings/repository.json | 3 ++- docs/SECURING.md | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/settings/repository.json b/.github/settings/repository.json index 92d2852..299eefd 100644 --- a/.github/settings/repository.json +++ b/.github/settings/repository.json @@ -1,3 +1,4 @@ { - "allow_auto_merge": true + "allow_auto_merge": true, + "delete_branch_on_merge": true } diff --git a/docs/SECURING.md b/docs/SECURING.md index d2c0de0..a5785e5 100644 --- a/docs/SECURING.md +++ b/docs/SECURING.md @@ -18,7 +18,7 @@ policy files document the expected configuration and validate workflow changes. required checks, and blocks deletion and force pushes. It also requires CODEOWNER approval for the paths assigned in [CODEOWNERS](../.github/CODEOWNERS). -- Allow GitHub native auto-merge using +- Allow GitHub native auto-merge and automatic deletion of merged PR branches using [repository.json](../.github/settings/repository.json). Maintainers opt in each ready PR; all required checks and reviews still gate the merge. - Retain the repository-administrator bypass used by Delaunay. Ordinary @@ -100,7 +100,7 @@ has a separate scope and approval path. ## Applying settings -Enable native auto-merge with the committed repository setting: +Enable native auto-merge and delete merged PR branches with the committed settings: ```sh gh api --method PATCH repos/acgetchell/Papers \