JIRA and GITHUB Actions integration
JIRA-GITHUB Integration ๐
Seamlessly integrate JIRA with GitHub using our ๐ integration.
Overview ๐
This project demonstrates a straightforward method to integrate JIRA with GitHub. Any changes made to a JIRA ticket, such as transitioning its status, will automatically trigger GitHub actions.
Features โจ
- Seamless Integration: Effortlessly connect JIRA with GitHub to streamline your workflow.
- Automated Triggering: Automatically trigger GitHub actions in response to any changes made to a JIRA ticket.
- Real-Time Updates: Stay up-to-date with real-time notifications in GitHub when a JIRA ticketโs status is transitioned.
- Enhanced Collaboration: Facilitate collaboration between development and project management teams by integrating JIRA and GitHub seamlessly.
- Efficient Workflow: Simplify your workflow by automating processes and reducing manual interventions between JIRA and GitHub.
Setup Instructions ๐ง
- Create PAT token under GITHUB account Goto Profile โ> Developer settings โ> PAT (with workflow access) and copy the PAT token and store it securely for now.
- Now letโs create the JIRA automation (Requires access to project automation) Goto JIRA project โ> settings โ> Automation โ> Click create Rule (letโs choose when issue is transitioned from in-progress to Done)
- Add the action as send web request.
- Configure the web request URL, the format of the github repository to invoke the workflow is below:
1
https://api.github.com/repos/[github-user]/[REPO]/actions/workflows/[WORKFLOW_ID]/dispatches
- Configure the other settings of the JIRA Automation:
- Set HTTP Method as POST
Web Request body as Custom with the following content (i.e. we are sending JIRA key number to the GITHUB request as my git repo workflow expects input)
1 2 3 4 5 6
{ "ref":"main", "inputs":{ "issue_key": "{{ issue.key }}" } }
Configure the headers section:
key value Hidden Authorization Bearer ยซPAT FROM GITHUBยป โ Accept application/vnd.github+json ย X-GitHub-Api-Version 2022-11-28 ย You can test validate by clicking on validate button, however you will need to set the โissue_keyโ to some hardcoded value, as you are manually triggering the automation.
1
"issue_key": "TEST"
you should see status code as 204
Remember to revert the issue_key, so that actual JIRA key is sent to GITHUB instead of test.
- Save the automation
Testing ๐งช
- Now letโs try to check if our automation is working as expected.
- Create a ticket and move the ticket from in-progress status to Done.
- This will trigger GITHUB-ACTIONS, go to the actions tab to verify.
- The JIRA ticket is present in the GITHUB logs as it was printed
Resources ๐
- GITHUB DISPATCH
Git repo ๐
Happy coding! ๐