Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

How To Set up a Two-Way Jira GitHub Integration

Teams using Jira products (Software, Service Management, and others) can sync information from issues, epics, and other entities with corresponding GitHub issue fields.

 

You need a dedicated integration solution for this. One option is the native solution on the Atlassian Marketplace, but this tool supports only a few entities. 

 

The other option I’d recommend is the third-party integration solution, Exalate. This solution provides a scripting engine for mapping the incoming and outgoing data on both Jira and GitHub.

 

Here’s how it works. 

4 Simple Steps To Set up Your Jira to GitHub Integration

Step 1: Install Exalate on Both Jira and GitHub

The Exalate app is available on our integrations page. Or you can download it directly from Atlassian and GitHub marketplaces.

 

For a visual guide, watch the Jira installation videos here and the GitHub installation videos here

Step 2: Connect Jira to GitHub

First, outline the integration requirements for both sides to help you create mappings for projects, fields, and entities. Then, set up a connection between Jira and GitHub. 

 

To create a connection, open the Jira instance and enter the URL for the GitHub instance.

image2.png

Choose a configuration option. Exalate supports two modes for Jira to GitHub integration: Basic and Script. 

 

The Basic mode supports basic entity mappings but you cannot configure the integration. The Script mode supports advanced configuration and scripting. 

 

To learn how to script your Exalate connections, check out the detailed configuration guide

Step 3: Write the Sync Rules

The Exalate console supports the Groovy scripting language for configuring one-way and two-way syncs.

 

The console makes it possible to map data from projects, repos, types, assignees, summaries, descriptions, comments, and much more. 

 

The Outgoing sync textbox decides what you want to send the other side, while the Incoming sync textbox decides how (and where) the information from the remote side appears. 

  

image3.png

 

Here is a sample line of code for syncing Jira custom fields.

 

replica.customFields."Custom field name" = issue.customFields."Custom field name"

 

The above code snippet populates the custom field in Jira with a value from the GitHub side and vice versa. In the other instance’s incoming sync, make sure to map the value received from GitHub to the correct issue field. 

Step 4: Automate Your Sync With Triggers

Triggers are conditions that control how your sync works. Once a condition is fulfilled, the sync is automatically carried out. 

 

You can configure triggers using Jira Query Language (JQL) and GitHub’s advanced search syntax.

 

  image1.png

 

Here are sample JQL triggers:

  • project = FIR and labels = sync
  • project = XProject and assignee = JDoe
  • worklogDate > startOfWeek()

 

Here are sample GitHub triggers:

  • is:issue is:open label:bug repo:username/test
  • is:pr is:open repo:username/test
  • is:issue org:Organization

 

You can now sync your data automatically based on the rules and triggers you have set.  

Advanced Jira to GitHub Integration Use Cases

  • Sync milestones between GitHub and Jira.
  • Sync pull requests between Jira and GitHub. 

 

To learn more about syncing Jira and GitHub, reach out to us to discuss your use case.

2 comments

Comment

Log in or Sign up to comment
francis
Marketplace Partner
Marketplace Partners provide apps and integrations available on the Atlassian Marketplace that extend the power of Atlassian products.
May 8, 2024

Check out the Jira GitHub integration video 

:point_right::skin-tone-2: https://bit.ly/4dxE7lO

Like Manoosh Majdzadeh likes this
Maksim Beliaev May 21, 2024

we covered our use case with simple GH to Jira addon for PRs and Commits

 

To sync issues we use this GitHub app (single direction only)

https://github.com/canonical/gh-jira-sync-bot

TAGS
AUG Leaders

Atlassian Community Events