Hi,
I can add a comment to pull request using rest api like this
curl -u "username:password" -H 'Content-type: application/json' -X POST https://bitbucket.abc.com/rest/api/latest/projects/SNDBX/repos/testing/pull-requests/1/comments -d '{"text":"mycomment"}'
Is there anyway to add a label to pull request ?
Hi Amulya,
Bitbucket Server doesn't currently have labels for pull requests. You can get them by using a plugin like the free Pull Request Labels one, but this doesn't provide an API endpoint.
We do have an open feature request to add pull request labels natively in Bitbucket Server. Presumably that would come with an API endpoint. If that's important to you, I suggest watching and voting on that issue!
Cheers,Daniel
Thank you Daniel for your reply.
Any update from Bitbucket on this?
Hey @Sanjay Pant !
The suggestion ticket is still listed as gathering interest. For more information about how Atlassian prioritizes feature requests made on jira.atlassian.com, check out this Community post. Keeping an eye on the ticket directly by watching it is the best way to stay up to date on the latest information. For your convenience in receiving this reply for email, here's a link to that feature request again: https://jira.atlassian.com/browse/BSERV-10715
Hi Akota!
It is certainly possible to add a label to pull requests via rest API. You may be interested in one of our apps Organizr for Bitbucket!
Organizr will allow you to view and search by pull request 'label(s)', 'state', 'duedate', 'reviewer'(s), 'project', 'target' branch(es), any 'text' and 'author'(s) - for example "state=open & duedate <= 2016-Aug-23 & label IN (release_1, urgent) & text ~ junit" across the entire Bitbucket instance.
Here is an example of how labels are displayed and how they could be searched for (filter bar at the top);
Here is a link to labels API specLine 242 of the source file in izymes-support / organizr-public-apis
If you would like to suggest any additional functionality or need other support, we would love to hear from you!
Happy Coding!
Sean
// Izymes
It looks like you're new here. Sign in or register to get started.