Uploaded image for project: 'Bitbucket Data Center'
  1. Bitbucket Data Center
  2. BSERV-8167

BranchType Java API should expose getPrefix()

XMLWordPrintable

    • 0
    • We collect Bitbucket feedback from various sources, and we evaluate what we've collected when planning our product roadmap. To understand how this piece of feedback will be reviewed, see our Implementation of New Features Policy.

      As of BitBucket Server v4.1.0:

      In the Branching Model section of Repository settings we can set branch prefixes for BranchTypes (Bugfix, Feature, Hotfix, Release). This prefix cannot be obtained via the Java API.

      In the API, we can obtain a BranchType (com.atlassian.bitbucket.branch.model.BranchType), which only exposes the methods getDisplayName() and getId().

      However, a REST call to STASH_HOME/rest/branch-utils/1.0/projects/project/repos/repo/branchmodel results in the resulting JSON:

      {"development": ... ,"types": [

      {"id":"BUGFIX","displayName":"Bugfix","prefix":"bugfix/"}

      , ... ]}

      Notice the element in the "types" array has an id, displayName, and prefix: the Java API doesn't expose the same information as the REST API. It would make sense to unify their capabilities.

      The suggestion then is to expose a getPrefix() method.

              Unassigned Unassigned
              92def4dc6cf6 Win Wang
              Votes:
              6 Vote for this issue
              Watchers:
              9 Start watching this issue

                Created:
                Updated:
                Resolved: