Security Global Forum

 View Only

Integration of Github-issues with JIRA Programatically

By Swapnil Kanthale posted Mon October 09, 2023 05:56 AM

  

Integration of Github-issues with JIRA 

 

     Managing software projects effectively requires robust issue tracking and collaboration among development teams. GitHub Issues and Jira are two popular tools for this purpose. 

    Managing GitHub issues always has been extra tasks for the development teams , issues like (Mend/White-Source) which needs to be addressed on priority for security of the code tend to get missed due to mismanagement to overcome this issue we have Integrated the GitHub Apis with JIRA so that each issues gets addressed and necessary action should be taken by proper notification through JIRA . 

   

 This blog post will explore the integration of GitHub Issues with Jira using Python scripting, which will automate synchronization and streamline project management.  

 Prerequisites 

Before we begin, ensure you have the following prerequisites: 

 

    GitHub Account: You'll need a GitHub account with access to the repository you want to integrate. 

    Jira Account: Access to a Jira instance where you have admin privileges. 

    Python: A working Python environment on your local machine. 

 

     Step 1:  

           Create a GitHub Personal Access Token 

           You need a GitHub Personal Access Token to interact with the GitHub API using Python.  

    Follow these steps to generate one: 

  • Go to your GitHub account settings. 

  • on "Developer settings" > "Personal access tokens." 

  • Click "Generate token" and select the necessary permissions (e.g., repo, workflow, issues). 

 

A screenshot of a computer

Description automatically generated 

 

    Make sure to store your token securely, as it won't be visible again. 

    Step 2: Set Up a Python Environment 

You can use Python libraries like requests and jira to interact with GitHub and Jira. Install them if you haven't already: 

 

 

 

 

A black rectangular object with a black background

Description automatically generated 

 

 

 

 

    Step 3: Write a Python Script 

    Create a Python script to automate the integration. Here's an example script that synchronizes GitHub Issues with Jira: 

 

 

 

 

    Customize the script with your specific GitHub and Jira details. This script retrieves GitHub issues and creates or updates corresponding issues in Jira. 

    Step 4: Run the Script 

    Execute the Python script, and it will synchronize GitHub Issues with Jira. You can schedule this script to run periodically to maintain real-time synchronization. 

 

    Conclusion :

    Integrating GitHub Issues with Jira using Python scripting can save your team valuable time and ensure that issue tracking remains consistent across both platforms. By automating the synchronization process, you can focus on your development tasks and leave the tedious work to your script. This integration is a powerful tool for enhancing project management efficiency in software development. 

Author Details:     Swapnil Kanthale (Swapnil.kanthale1@ibm.com)

Reviewer Details:  Boudhayan Chakrabarty (bochakra@in.ibm.com) 

0 comments
18 views

Permalink