`gh pr merge --auto -d` does not delete the branch after merge · Issue #9073 · cli/cli · GitHub
Skip to content

gh pr merge --auto -d does not delete the branch after merge #9073

Description

@arcivanov

Describe the bug

A successful gh pr merge --auto -d does not delete the branch after a successful merge. It's unclear whether it's GH CLI problem or GH API.

Steps to reproduce the behavior

The PR in question that didn't have a branch auto-deleted is here: karellen/karellen-llvm#40
The branch was marked for auto-merge and auto-delete here: https://github.com/karellen/karellen-llvm/actions/runs/9048046223/job/24860694266#step:4:62 (line 61)

If this is not something that can be fixed in GH CLI and GH API the documentation update is necessary to note that it's not an expected behavior.

Expected vs actual behavior

Expected: PR auto-merge will be followed by auto-delete if delete is requested.
Actual: The PR is automatically merged but the branch remains.

Logs

Above in the action items.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinggh-prrelating to the gh pr commandpriority-3Affects a small number of users or is largely cosmetic

    Type

    No type

    Fields

    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