Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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?

like image 338
mar-schmidt Avatar asked Dec 12 '19 18:12

mar-schmidt


People also ask

What is the JIRA GitHub integration?

The Jira GitHub integration, made possible through Git Integration for Jira, allows you to easily drive Jira with your GitHub repository.

Does your business need Jira or DevOps automation?

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.

What are the most common uses of Jira?

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.

What are webhooks and automation for Jira?

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.


1 Answers

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.

like image 58
Madhu Bhat Avatar answered Sep 20 '22 10:09

Madhu Bhat