Junie Help

Junie GitHub Action

Junie GitHub Action integrates Junie CLI into your GitHub workflows. It also allows you to trigger Junie to run code reviews, fix bugs, or implement new features right from GitHub issues or PR comments.

The action executes entirely on your GitHub runners, so your code always stays on your infrastructure.

View on GitHub Marketplace

Key features

  • Turning issues into fixes: Junie creates pull requests with code changes or fixes from issue descriptions, PR reviews, or comments.

  • Agent-enhanced CI/CD automation: Fix CI build failures, automatically resolve merge conflicts, or solve your specific CI/CD goals with Junie CLI.

  • Task- or workflow-specific prompts: Tag Junie and provide instructions in GitHub issues, comments, or PR reviews, or just pre-define your prompt to run every time when the workflow is triggered.

  • Flexible triggers: Trigger Junie CLI on specific events in your CI/CD pipeline, via mentions, assignees, or labels.

  • Silent mode: Run Junie CLI in silent mode without writing comments or committing changes as an output.

  • MCP extensibility: Connect to pre-configured MCP servers from GitHub Actions workflows.

  • Agent guidelines for GitHub: Define GitHub-specific guidelines that would override the default guideline file. This can be useful if you are using Junie both in your JetBrains IDE or terminal and in GitHub Actions.

Setup

Get started in minutes with your API key and preconfigured templates.

To set up Junie GitHub Actions in your repository:

  1. Add JUNIE_API_KEY to the repository's secrets in SettingsSecrets and variablesActions. To generate the key, go to junie.jetbrains.com/cli.

  2. Add one of the preconfigured workflow files to your repository's .github/workflows/.

    To start with, you can copy and paste the following junie.yaml template:

    name: Junie on: issue_comment: types: [created] pull_request_review_comment: types: [created] issues: types: [opened, assigned] pull_request_review: types: [submitted] jobs: junie: if: | (github.event_name == 'issue_comment' && contains(github.event.comment.body, '@junie-agent')) || (github.event_name == 'pull_request_review_comment' && contains(github.event.comment.body, '@junie-agent')) || (github.event_name == 'pull_request_review' && contains(github.event.review.body, '@junie-agent')) || (github.event_name == 'issues' && (contains(github.event.issue.body, '@junie-agent') || contains(github.event.issue.title, '@junie-agent'))) runs-on: ubuntu-latest permissions: contents: write pull-requests: write issues: write steps: - name: Checkout repository uses: actions/checkout@v4 with: fetch-depth: 1 - name: Run Junie id: junie uses: JetBrains/junie-github-action@v1 with: junie_api_key: ${{ secrets.JUNIE_API_KEY }}

    This workflow will run Junie CLI whenever the user tags @junie-agent in an issue or PR comment.

A repository can have multiple workflow files with the Junie GitHub Actions in it, each performing a different set of tasks.

See the cookbook for examples of workflow templates to help you get up and running with different scenarios. You can adapt the templates to configure triggers, permissions, branches, or output, adjust the prompt, or further customize the action with parameters.

Parameter reference

Input Parameters

Trigger configuration

Input

Description

Default

trigger_phrase

The phrase to activate Junie CLI in comments/issues.

@junie-agent

assignee_trigger

Username that triggers when assigned.

-

label_trigger

Label that triggers the action.

junie

Branch management

Input

Description

Default

base_branch

The base branch for creating new branches from.

github.base_ref

create_new_branch_for_pr

Create a new branch for PR contributors.

false

Junie configuration

Input

Description

Default

prompt

Custom instructions for Junie.

-

junie_version

Junie CLI version to install.

561.1.0

junie_work_dir

Working directory for Junie files.

/tmp/junie-work

junie_guidelines_filename

Filename of the guidelines file (should be in <project-root>/.junie dir).

guidelines.md

allowed_mcp_servers

MCP servers to enable (comma-separated).

-

Advanced features

Input

Description

Default

resolve_conflicts

Enable automatic conflict detection (not needed for manual @junie-agent resolution).

false

silent_mode

Run Junie without comments, branch creation, or commits - only prepare data and output results.

false

use_single_comment

Update a single comment for all runs instead of creating new comments each time.

false

use_structured_prompt

Use the new structured prompt format with XML tags for better organization.

true

Authentication

Input

Description

Required

junie_api_key

JetBrains Junie API key.

Yes

custom_github_token

Custom GitHub token (optional).

No

Output parameters

Output

Description

branch_name

Name of the working branch created by Junie.

should_skip

Whether Junie execution was skipped (no trigger matched or no write permissions).

commit_sha

SHA of the commit created by Junie (if any).

pr_url

URL of the pull request created by Junie (if any).

junie_title

Title of the task completion from Junie.

junie_summary

Summary of the changes made by Junie.

github_token

The GitHub token used by the action.

Example usage:

- uses: JetBrains/junie-github-action@v0 id: junie with: junie_api_key: ${{ secrets.JUNIE_API_KEY }} - name: Use outputs if: steps.junie.outputs.should_skip != 'true' run: | echo "Branch: ${{ steps.junie.outputs.branch_name }}" echo "Title: ${{ steps.junie.outputs.junie_title }}" if [ "${{ steps.junie.outputs.pr_url }}" != "" ]; then echo "PR created: ${{ steps.junie.outputs.pr_url }}" fi

MCP servers

The available pre-configured MCP servers are:

MCP server

Description

mcp_github_checks_server

Analyzes failed GitHub Actions checks.

mcp_github_inline_comment_server

Creates inline code review comments with GitHub suggestions on PRs (enabled automatically for PRs).

Example configuration:

- uses: JetBrains/junie-github-action@v0 with: junie_api_key: ${{ secrets.JUNIE_API_KEY }} allowed_mcp_servers: "mcp_github_checks_server"
26 January 2026