Reading Pull Request review status for Github using JQL

Jason Strobush December 10, 2021

Hello!

 

I'm working on seeing what is possible with JIRA Cloud Automation, and I'm currently investigating what is possible using the development issue field, in particular development[reviews].

 

https://support.atlassian.com/jira-software-cloud/docs/advanced-search-reference-jql-developer-status/ seems to suggest that this should return any JIRA issues that are pending pull request approval ... 


development[reviews].open > 0 order by created DESC


... but this results in no issues being returned, even when the JIRA Pull Request screen for a given issue shows that there is an Open pull request in Github, and it has no approvals (there's no face with checkmark in the Reviewer column, in fact, no face at all.)

 

The built-in automation has events for Pull request created, pull request declined, and pull request merged.  But I'm trying to build something that fires when an issue transitions, but the pull request approval is in the wrong state.

Any suggestions?  Googling just brought me to various versions of the linked document above. 

 

Thanks in advance!

1 answer

1 vote
Andy Heinzer
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
December 17, 2021

Hi Jason,

I understand that you are trying to find issues in Jira that have linked reviews from GitHub.  However not all development information is available to Jira from all development sources equally.  We try to explain this over in View development information for an issue.  From that functionality description, only Fisheye/Crucible is viewing/creating reviews from Jira.

I believe this is why the JQL in Jira is not showing any results to your query about these reviews.

As for how to best try to work-around this, I'm not sure I have enough information to advise you here.  I gather that you want an automation trigger to be when the issue is transitioned, and you are looking for a comparison condition regarding the reviewer/approval.  But what action are you wanting to happen from the issue in Jira when this criteria is met?

Perhaps we can work through another way to have automation check for this.  My initial though was to try to look at alternative triggers here, such as the DevOps triggers, but looking through the Jira smart values - development does not appear to provide us with any smart values that directly show the reviewer info.

So perhaps instead it might be worth trying to setup Incoming webhook trigger to Jira itself (which can be really slick to setup and then have GitHub call that specific webhook URL in Jira).  This method could potentially provide Jira with the specific information from Github's side of things that you can then use within the automation comparisons and actions to effect some change on the issue in Jira, but without knowing what action are you looking to achieve here, I'm not sure how best to guide you.

I'd be interested to learn more here so that maybe we can come up with another way to try to help here.

Andy

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
TAGS
AUG Leaders

Atlassian Community Events