Junie Help

JIRA integration

Integrate Junie CLI into your Atlassian JIRA workflows to automatically implement features and fix issues according to the tasks in JIRA issues.

How it works

When a JIRA issue is created or updated with a pre-configured trigger, a Junie GitHub Action workflow is started via workflow_dispatch.

Junie receives the issue details (key, summary, description, user discussion in the comments, and files/screenshots/diagrams attached to the issue), creates a GitHub PR with the required changes, and adds a comment to the JIRA issue with the PR link. The issue state is changed to In Progress when Junie starts working and then to In Review when it is finished.

Setup

On the GitHub side

Configure the GitHub project where the Junie GitHub Action will be run:

  1. Add the following secrets to your GitHub repository in SettingsSecrets and variablesActions.

    Secret

    Description

    Required

    JUNIE_API_KEY

    The API key for Junie CLI generated at junie.jetbrains.com/cli.

    Yes

    JIRA_EMAIL

    The email address registered for your JIRA account.

    Yes

    JIRA_API_TOKEN

    The JIRA API token created in the settings of your Atlassian account.

    Yes

    JIRA_BASE_URL

    The URL of your JIRA instance, for example, https://your-company.atlassian.net.

    Yes

    JIRA_TRANSITION_IN_PROGRESS

    Custom transition ID for the In Progress status (default: 21).

    No

    JIRA_TRANSITION_IN_REVIEW

    Custom transition ID for the In Review status (default: 31).

    No

  2. Copy and add the .github/workflows/junie-jira.yml workflow file to your GitHub repository.

    name: Junie Jira Integration on: workflow_dispatch: inputs: action: description: 'Action type' default: 'jira_event' required: true type: string issue_key: description: 'Jira issue key (e.g., TEST-1)' required: true type: string issue_summary: description: 'Jira issue summary/title' required: true type: string issue_description: description: 'Jira issue description' required: false type: string issue_comments: description: 'Jira issue comments' required: false issue_attachments: description: 'Jira issue attachments' required: false jobs: junie: runs-on: ubuntu-latest permissions: contents: write pull-requests: write issues: write if: ${{ inputs.action == 'jira_event' }} steps: - name: Checkout repository uses: actions/checkout@v4 with: fetch-depth: 1 - name: Run Junie id: junie uses: JetBrains/junie-github-action@v0 with: junie_api_key: ${{ secrets.JUNIE_API_KEY }} jira_base_url: ${{ secrets.JIRA_BASE_URL }} jira_email: ${{ secrets.JIRA_EMAIL }} jira_api_token: ${{ secrets.JIRA_API_TOKEN }} # jira_transition_in_progress: ${{ secrets.JIRA_TRANSITION_IN_PROGRESS }} # jira_transition_in_review: ${{ secrets.JIRA_TRANSITION_IN_REVIEW }}

On the JIRA side

In your JIRA project, configure automation rules in Project settingsAutomation:

  1. In Manage secrets (or organization-level Automation secrets), add a new secret named GITHUB_TOKEN that will be used to authorize requests to the GitHub API from automation rules in JIRA.

    As the value, provide a GitHub Personal Access Token (classic or fine-grained) with at least workflow scope (and repo for private repositories). This token will be referenced in headers as {{secrets.GITHUB_TOKEN}}.

  2. Create an automation rule with a trigger of your choice (for example, Label added (such as junie-agent) or Issue created) to trigger the workflow.

  3. Add a Send web request action with the following configuration:

    URL:

    https://api.github.com/repos/{owner}/{repo}/actions/workflows/junie-jira.yml/dispatches

    Method: POST

    Headers:

    Authorization: Bearer {{secrets.GITHUB_TOKEN}} Content-Type: application/json

    Body (Custom data):

    { "ref": "YOUR DEFAULT BRANCH(main/master for example)", "inputs": { "action": "jira_event", "issue_key": "{{issue.key}}", "issue_summary": "{{issue.summary.jsonEncode}}", "issue_description": "{{issue.description.jsonEncode}}", "issue_comments": "[{{#issue.comments}}{\"author\":\"{{author.displayName.jsonEncode}}\",\"body\":\"{{body.jsonEncode}}\",\"created\":\"{{created}}\"}{{^last}},{{/}}{{/}}]", "issue_attachments": "[{{#attachment}}{\"filename\":\"{{filename.jsonEncode}}\",\"mimeType\":\"{{mimeType}}\",\"size\":{{size}},\"content\":\"{{content}}\"}{{^last}},{{/}}{{/}}]" } }
14 March 2026