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?
The Jira GitHub integration, made possible through Git Integration for Jira, allows you to easily drive Jira with your GitHub repository.
However, a healthy business needs Jira to always remain the central source of truth. These DevOps automation rules solve problems for both. Using automation, you can now integrate directly with Bitbucket, GitHub, GitLab and more so your devs can focus on shipping great code, safe in the knowledge that automation will do the work in Jira for them.
Let’s take a look at the most common uses. When a Pull Request is merged in GitLab, if the Jira issue status is 'In Review' and there are no open PRs, then transition to 'done' and add value to the audit log. Automatically notify the correct team when a commit is created in Bitbucket, GitLab or GitHub.
Webhooks and Automation for Jira provide a very neat way for you to automate your Jira administration in a customized way and tailored to your requirements. GitHub is only one example.
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
.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With