-
Suggestion
-
Resolution: Low Engagement
-
None
-
0
-
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.