The Atlassian Community Forums are currently in read-only mode. We will be relaunching on a new platform on September 22 (read more here). We apologize for the extended downtime. For concerns or questions, please email communitymanagers@atlassian.com. See you on the other side, on the new Atlassian Community Forums! :)

×

Forums

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

How to list all Pull Request comments, once merged, in a Jira comment via Github?

Andrew McFarland
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!
November 15, 2023

Is listing all PR comments in JIRA, once it has been merged, possible using this feature? I don't see it listed anywhere under JIRA smart values.

Tools/Apps: Jira (Cloud), GitHub for Jira

I am trying to create an automation rule that would look like:

  1. When: Pull request merged
  2. Then: Add comment to issue (see below for comment body)
{{pullRequest.title}}
{{pullRequest.state}}
{{pullRequest.sourceBranch}}

{{pullRequest.comments}}   <- trying to output ALL comments in the PR that was merged to be sent into the created Jira comment via the automation rule

1 answer

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

0 votes
Stefan Salzl
Community Champion
November 17, 2023

Hi @Andrew McFarland 

welcome to the Atlassian Community ;)

Unfortunately there is no native smart value in Jira to get comments from a PullRequest.

I just checked to docu of github rest api and there is a possibility to get those comments from issues, pullRequests and pullRequest-reviews. See the link below:

https://docs.github.com/de/rest/issues/comments?apiVersion=2022-11-28

 

I would suggest to call the github in your automation rule via "Send webrequest" action and add these informations from the JSON respond.

 

Best
Stefan

DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
TAGS
AUG Leaders

Atlassian Community Events