Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

How do I extract all the comments from pull request ?

Nagaraj May 8, 2018

Hello,

I am looking for the report, to extract all the comments from the pull request.

 

1 answer

0 votes
Leonardo M
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
May 17, 2018

Hey there,

We don't really provide a way to do this natively but it's possible to get the pull request's comments using the Bitbucket API. I believe you can use this one: https://developer.atlassian.com/bitbucket/api/2/reference/resource/repositories/%7Busername%7D/%7Brepo_slug%7D/pullrequests/%7Bpull_request_id%7D/comments 

You can run some sort of loop in a bash script and get all the comments using the GET method as described in the page I've linked above.

Nagaraj May 18, 2018

Hey Leonardo,

Thanks for the information. Could you please provide more information on this.

How can I install l the GET method.

Leonardo M
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
May 18, 2018

Hey Nagaraj,

You don't actually install the method or anything, what you do is you go to your local terminal (aka your cmd or bash) and run the command according to your needs.

Starting from the documentation I've provided before you should be able to write a custom bash/batch script which will go through a loop and get all comments from the pull request you wish. :)

Nagaraj May 21, 2018

Hi Leonardo,. 

Thanks, I am exactly looking for the pull request code review comments (inline code review comments).

Could you help me on that.

Nagaraj May 22, 2018

HI Leonardo, 

I went through the link, but I am not able to understand.  Below is my bitbucket link, where I am able to see the inline review comment. Could you please help me how to get those inline review comments. Thanks in advance. 

https://bitbucket.org/Nagarag03/bitbucketstationlocations/pull-requests/1/branch-created-online-with-bitbucket/diff
photo.PNG

mohit guptaaa
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
October 28, 2018

Nagaraj, have you got the solution?

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events