Skip to content

[Bitbucket] - Delete source branch when merging Pull Request #1113

Open
@theChrO

Description

@theChrO

Hallo,
I have been doing some small coding with this module so far to automate some of our repetitive tasks dealing with a bigger amount of git repositories. Now I am trying to automate merging approved pull requests using the merge_pull_request(...) method.

Is there a way to have the source branch automatically deleted after merging, as it is offered by the web gui and also by the bitbucket REST API[1]? At least merge_pull_request() does not seem to offer this functionality. Did I miss anything or do I have to implement this behaviour in 2 separate steps (merge_pull_request() && delete_branch())?

Thanks for any hint.
Cheers,
Chris

[1] https://developer.atlassian.com/cloud/bitbucket/rest/api-group-pullrequests/#api-repositories-workspace-repo-slug-pullrequests-pull-request-id-merge-post-example

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