Skip to content

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

@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

Activity

changed the title [-]Bitbucket - Delete source branch when merging Pull Request[/-] [+][Bitbucket] - Delete source branch when merging Pull Request[/+] on Feb 19, 2023
gonchik

gonchik commented on Feb 19, 2023

@gonchik
Member

Hallo,
@PostChrO did you find the solution ?
if so, I will be happy to look the MR request :)

theChrO

theChrO commented on Feb 20, 2023

@theChrO
Author

Hallo, @PostChrO did you find the solution ?

no, didn't look further into this topic.

if so, I will be happy to look the MR request :)

as I understand this, the "delete after merge" functionality of the API is not implemented as of now? In the first step I'm looking for confirmation to make sure I didn't miss anything in the code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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

        Participants

        @gonchik@theChrO

        Issue actions

          [Bitbucket] - Delete source branch when merging Pull Request · Issue #1113 · atlassian-api/atlassian-python-api