Skip to content

Improve message after merging branch but not deleting #15

@haensch-mauricio

Description

@haensch-mauricio

When merging a branch that cannot be deleted because of some reason, the only output is an exception message of "cannot delete branch", with no hints that the merge itself was successful.

To illustrate, this was my workflow:

I had 3 branches: A, B and C and two open PRs: A <- B and B <- C

I tried doing a !merge B and got only this message:

Computer says nooo. See logs for details:
400: {'errors': [{'context': 'name', 'message': 'You cannot delete this branch since it has at least one open pull request associated with it', 'exceptionName': 'com.atlassian.bitbucket.internal.branch.UnsupportedOnBranchException'}]}

At first I thought that the merge didn't occur since no confirmation showed up, so I changed the target of my PR 2 to be A <- C and used the same command again, !merge B and this time got this message:

No pull request open for this branch!

Then I confirmed and the merge was really done, I believe it is just question of improving the output when an exception occurs.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions