For better tracing closed tasks in continuous integration process it is very convenient to have information about a merged pull request (number/description) instead of a particular commit (hash/comment). Unfortunately, the only information that can be provided by GIt is information about a commit (especially if this was a fast-forward commit). Is there any way to determine a number of a pull request by a commit hash from a script/command line (using Stash REST API or plugins)?
On the Java API, it is easy to get from the pull request to the commit hash by using PullRequest.getFromRef(). Something like this probably exists on the REST API too.
Getting to the pull request from the commit hash is more tricky. You can use PullRequestService.search() to find a Pull Request based on the branch (ref) if you use a PullRequestSearchRequest with getFromRefIds(). Not sure how to get the ref based on the commit hash, though.
Badges are a great way to show off community activity, whether you’re a newbie or a Champion.Learn more
After spinning my wheels trying to get organized enough to write a book for National Novel Writing Month (NaNoWriMo) I took my affinity for Atlassian products from my work life and decided to tr...
Connect with like-minded Atlassian users at free events near you!Find a group
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no AUG chapters near you at the moment.Start an AUG
You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs