mar-schmidt
mar-schmidt

Reputation: 394

Jira automation smart values of github integration

I have the Github integration for Jira and want to set up some Jira automations integrating with Github API. What I'm looking for specifically is the possibility to get hold of either the Github PR id (or the full PR link) from the "smart values" library within Jira.

I've tried issue.property[development].pr but it doesn't return anything.

Any ideas if the PR info is exposed as smart values in Jira at all?

Upvotes: 9

Views: 1594

Answers (1)

Madhu Bhat
Madhu Bhat

Reputation: 15223

All the GitHub related data would be present in the webhookData smart value, which will contain the data sent by GitHub's webhook.

So to access the PR's URL, you can use webhookData.pull_request.html_url as shown in the screenshot below. Similarly, you can access any other field sent by GitHub's webhook payload via webhookData.

enter image description here

Credits: The complete steps on integrating Jira and GitHub using Automation for Jira is provided in Simeon Ross's article.

The issue smart value would have all the data associated with a JIRA issue. You can create custom fields and set them to the issue when the GitHub data is receiver by the webhook. So if you have added any GitHub data to your issue, you can find the json representation of the issue and try finding out the right smart value with customField.value. You can try accessing the custom fields by following the steps in here.

Upvotes: 3

Related Questions