From bac6da8071ada152cce76cfbd24b54b7190ad799 Mon Sep 17 00:00:00 2001 From: Peter Evans <18365890+peter-evans@users.noreply.github.com> Date: Fri, 1 Mar 2024 20:02:35 +0900 Subject: [PATCH] docs: update description of delete-branch --- README.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 6647c6a4cf..e43f59a042 100644 --- a/README.md +++ b/README.md @@ -91,7 +91,11 @@ In addition to a message, the `commit-message` input can also be used to populat #### delete-branch The `delete-branch` feature doesn't delete branches immediately on merge. (It can't do that because it would require the merge to somehow trigger the action.) -The intention of the feature is that when the action next runs it will delete the `branch` if it doesn't have an active pull request associated with it. +The intention of the feature is that when the action next runs it will delete the `branch` if there is no diff. + +Enabling this feature leads to the following behaviour: +1. If a pull request was merged and the branch is left undeleted, when the action next runs it will delete the branch if there is no further diff. +2. If a pull request is open, but there is now no longer a diff and the PR is unnecessary, the action will delete the branch causing the PR to close. If you want branches to be deleted immediately on merge then you should use GitHub's `Automatically delete head branches` feature in your repository settings.