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 f2b69c5..93ebf0a 100644 --- a/docs/SECURING.md +++ b/docs/SECURING.md @@ -20,7 +20,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 @@ -141,7 +141,7 @@ uses it. Rerunning an older job does not load a newly deployed caller. ## 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 \