This GitHub Action synchronizes issues from JIRA to a specified GitHub repository using Loki.
To use this action, add the following step to your GitHub Actions workflow:
- name: loki-sync-jira-to-github
uses: aurora-labs-42/[email protected]
with:
from-jira: "<JIRA_BASE_URL>"
to-repo: "<GITHUB_REPOSITORY>"
labels: "label1,label2"
jql: "<JIRA_QUERY_LANGUAGE>"
env:
GITHUB_ACCESS_TOKEN: ${{ secrets.GITHUB_TOKEN }}
JIRA_ACCESS_TOKEN: ${{ secrets.JIRA_ACCESS_TOKEN }}
- from-jira: The base URL of your JIRA instance where issues are located. Example:
"<JIRA_BASE_URL>"
- to-repo: The GitHub repository where the JIRA issues will be synchronized. Example:
"<GITHUB_REPOSITORY>"
- labels: The GitHub labels applied to the issues synchronized. Example:
"label1,label2"
- jql: The JIRA Query Language (JQL) statement to filter and find the issues to be synchronized. Example:
"<JIRA_QUERY_LANGUAGE>"
- GITHUB_ACCESS_TOKEN: The GitHub access token to authenticate the action. This should be stored as a secret in your GitHub repository. Example:
${{ secrets.GITHUB_TOKEN }}
- JIRA_ACCESS_TOKEN: The JIRA access token to authenticate the action. This should be stored as a secret in your GitHub repository. Example:
${{ secrets.JIRA_ACCESS_TOKEN }}
Here's an example of a complete GitHub Actions workflow using this action:
name: Sync JIRA Issues to GitHub
on:
schedule:
- cron: '0 * * * *' # Runs every hour
jobs:
sync-issues:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Get repository name
id: repo-name
run: echo "::set-output name=name::$(basename $GITHUB_REPOSITORY)"
- name: loki-sync-jira-to-github
uses: aurora-labs-42/[email protected]
with:
from-jira: "<JIRA_BASE_URL>"
to-repo: "<GITHUB_REPOSITORY>"
labels: "label1,label2"
jql: "<JIRA_QUERY_LANGUAGE>"
env:
GITHUB_ACCESS_TOKEN: ${{ secrets.GITHUB_TOKEN }}
JIRA_ACCESS_TOKEN: ${{ secrets.JIRA_ACCESS_TOKEN }}
- Ensure that the
GITHUB_ACCESS_TOKEN
andJIRA_ACCESS_TOKEN
are added to your repository secrets. - Modify the
jql
parameter to suit your specific requirements for filtering JIRA issues.
If you have any questions or feedback, feel free to open an issue or submit a pull request.