When querying the API for commit comments, I sometimes get anchors that have a diffType of "EFFECTIVE" with a toHash that appears to be generated somehow. Is there a way that I can use this data to get a list of commits used for this "effective" diff?
Here's an example from the "activities" endpoint:
Thanks for reaching out. I'm not 100% of what information you are after. If you are looking for a list commits in the pull request, then the pull request commits endpoint (or the PullRequestService.getCommits endpoint in Java) could give you what you are after.
The EFFECTIVE diff type is the diff that pull requests display by default. To produce this diff, the fromHash is the HEAD of the PullRequest.getToRef. The toHash is calculated by merging the PullRequest.getFromRef and PullRequest.getToRef. In essence the effective diff shows users "how the target branch will change if the PR was merged as is". You can find more information about the diff in this post.
Hope this is the information you were looking for.
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