Get list of merged branches using REST API

Issue #14022 open
Phil Rittenhouse
created an issue

In the Bitbucket web interface, one can filter the branch list as Active or Merged. I would like to use the REST API to get the list of Merged branches but it seems this is not supported. I can get a list of branches using the 1.0 API but there does not appear to be anything that indicates if they have been merged or not.

In our workflow we typically use the option to delete branches after they have been merged but occasionally we need to keep the branch for a while or sometimes users simply forget to delete branch. In either case it would be nice to have a way to remind users of any merged branches they have lying around. I was going to write a simple script to do this using the REST API but the merge status is not accessible.

Can the merge status be added to the API?

Thanks, Phil

Comments (4)

  1. Jeff Walter

    In lieu of having this API, which would be uber helpful, it would be really nice to have the ability to set rules for branch pruning directly in Bitbucket. We have a lot of lazy developers that trash up the repo with branches that are no longer needed. I really don't think forcing users to write a script to manage that is a great customer experience.

  2. Log in to comment