I want to get the latest tag on a particular branch.
For Example,
for a branch release/fix, there are n commits, but for each commit tags are not generated.
release/fix- commit #111
commit #110 - tag- 1.1.1
commit # 109 - tag 1.1.0
commit # 108
So, latest tag would be 1.1.1 for branch release/fix.
Need to get this via bitbucket api.
I want to get latest tag on branch release/fix.
G'day, @deepika dua
Welcome to the community.
You can get this information via the List tags endpoint and use sorting to sort them for the latest created tags. You can check our page below to understand how to use sorting.
For example:
https://api.bitbucket.org/2.0/repositories/{workspace}/{repo}/refs/tags?sort=-date
Regards,
Syahrul
I think the branch parameter is missing from this API, or can you use sorting to select the tags on a particular branch ?
I'm also interested in this question, on this risk of hijacking the OP's question I'd like to be able to get the result of `git describe` for a particular branch.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @deepika dua and @ccenvcvb,
I'm afraid that it is not possible to get that info via API, as our API doesn't return the branches that contain a certain commit or the result of `git describe` for a particular branch.
I can create a feature request for an API endpoint that returns the equivalent of `git describe` for a particular branch, for our development team to consider. Please feel free to let me know if you'd like me to do that.
Kind regards,
Theodora
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hey @ccenvcvb
I have raised a feature request on behalf of you at:
https://jira.atlassian.com/browse/BCLOUD-23188
Please don't forget to Vote and Watch them so that you'll receive an update if it's being considered.
Regards,
Syahrul
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.