My bitbucket cloud is integrated with jira.
From a historic and perhaps future release perspective, I have a set of commit ids that fall into a release.
I would like to programatically or using an api find out which jira ticket the commit corresponds to and then perhaps apply a label or fixversion to the same. I almost have a go code for the second part, but not sure of the first part
I assume you're already referencing your Jira issues in the commit messages as documented here: https://confluence.atlassian.com/jirasoftwarecloud/referencing-issues-in-your-development-work-777002789.html
Unfortunately there currently isn't a public API to retrieve that association but you can parse the issue key out of the commit message (e.g. using regex) and look it up using Jira's public API: https://developer.atlassian.com/cloud/jira/platform/rest/v3/#api-rest-api-3-issue-issueIdOrKey-get
Thanks for the prompt response. This did come in handy.
But I only wish there was api to help with the same to make things easier.
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.