Skip to content

--delete-branch=false flag does not prevent branch deletion on merge #11508

@hbelkhir

Description

@hbelkhir

When merging a pull request from the develop branch into master using the GitHub CLI with the --delete-branch=false flag, the develop branch is still deleted despite this flag being set.

The Automatically delete head branches setting enabled.

Command:

gh pr merge <PR_NUMBER> --repo <owner>/<repo> --match-head-commit $SHA_PULL -t "sync(): develop to master" --body "sync(): develop to master" --merge --admin --delete-branch=false

Expected behavior:
The branch should not be deleted after the merge when --delete-branch=false is specified.

Actual behavior:
The branch is deleted regardless of the --delete-branch=false flag.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinggh-prrelating to the gh pr commandmore-info-neededMore info needed from user/contributorneeds-triageneeds to be reviewedstale

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions