I’m new to bitbucket and searched the community but could not find a specific topic that covered this issue. How do I output the pull-request data from bitbucket so I can add the review and comment information to my code review word document?
I’m sure this has been covered and posted before, so if someone could forward me the post that covers this, it would be appreciated.
1 Like
Hi Tim,
that’s an interesting use case! Are you documenting the metadata of pull requests for reporting purposes and seeking to extract that metadata?
In any case, I figure your best bet is to extract PR data via the Bitbucket REST API
- Bitbucket Cloud (bitbucket.org): https://developer.atlassian.com/cloud/bitbucket/rest/api-group-pullrequests/#api-repositories-workspace-repo-slug-pullrequests-pull-request-id-get
Authentication via username:app-password [1] - Bitbucket server/datacenter: REST Resources Provided By: Bitbucket Server - REST
Authentication via username:pw
You will get JSON data that represents the PR, from there you can extract the metadata you need.
[1] App passwords | Bitbucket Cloud | Atlassian Support
Hope that helps!
Best, Ulrich
// Izymes