Jira Github Integration

kukrejaravi March 29, 2024

I have my github repository integrated to jira github-for-jira: https://github.com/atlassian/github-for-jira

I have github action workflow in my repository which deploys my code and I see those deployments in my jira tickets. Each deployment I do via the workflow has a unique url which I want to provide to my QA team for testing. Is there a way I can add my URL to the deployments visible in jira? 


1 answer

0 votes
Sushant Verma
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
March 31, 2024

Hi @kukrejaravi 

Welcome to the community!

You can add the deployment URL to the deployments visible in Jira by using the Jira REST API. You can automate this process by modifying your GitHub Actions workflow to trigger a script that updates the Jira issue with the deployment URL.

Here's a general outline of how you can achieve this:

  1. Generate Jira API Token: First, generate an API token for your Jira account. You'll need this token to authenticate your requests to the Jira API.

  2. Create a Script: Write a script (e.g., in Python) that uses the Jira REST API to update the deployment information for a specific Jira issue. You can use the POST /rest/api/3/issue/{issueIdOrKey}/transitions endpoint to add a comment to the issue with the deployment URL.

  3. Integrate with GitHub Actions: Modify your GitHub Actions workflow YAML file to trigger the script after a successful deployment. You'll need to include the necessary environment variables for authentication (e.g., Jira API token, Jira issue key).

Regards,
Sushant Verma

kukrejaravi March 31, 2024

@Sushant Verma  Hello Sushant. Thank you for your response. Do I need a separate token from my user account, given my github repository and jira are already integrated via github-for-jira? 

Sushant Verma
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
April 1, 2024

@kukrejaravi  Yes!

Regards,
Sushant Verma

Suggest an answer

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

Atlassian Community Events