The GitHub Actions for Jira to create and edit Jira issues.
- Automatically transition an issue to done when a pull request whose name contains the issue key is merged
- Automatically create a new Jira issue when a GitHub issue is created
- Automatically add a comment to a Jira issue when a commit message contains the issue key
- Automatically create a Jira issue for each
// TODO:
in code
Login
- Log in to the Jira APICLI
- Wrapped go-jira CLI for common Jira actionsFind issue key
- Search for an issue key in commit message, branch name, etc. This issue key is then saved and used by the next actions in the same workflowCreate
- Create a new Jira issueTransition
- Transition a Jira issueComment
- Add a comment to a Jira issueTODO
- Create a Jira issue for each TODO comment in committed code
An example workflow to transition issue on push
:
on:
push
name: Test Transition Issue
jobs:
test-transition-issue:
name: Transition Issue
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@master
- name: Login
uses: atlassian/gajira-login@master
env:
JIRA_BASE_URL: ${{ secrets.JIRA_BASE_URL }}
JIRA_USER_EMAIL: ${{ secrets.JIRA_USER_EMAIL }}
JIRA_API_TOKEN: ${{ secrets.JIRA_API_TOKEN }}
- name: Find Issue Key
uses: ./
with:
from: commits
- name: Transition issue
uses: atlassian/gajira-transition@master
with:
issue: ${{ steps.create.outputs.issue }}
transition: "In Progress"