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@v0 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 in comments/issues.

@junie-agent

assignee_trigger

The username that triggers a Junie action when assigned.

-

label_trigger

The GitHub label that triggers a Junie action when applied to an issue.

junie

Branch management

Input

Description

Default

base_branch

The base branch for creating new branches from.

github.base_ref

create_new_branch_for_pr

Determines whether Junie should create a new branch when proposing changes for a pull request, or push commits directly to the existing branch of that PR.

false

Junie configuration

Input

Description

Default

prompt

User-defined instructions for Junie.

-

model

The LLM to use for Junie's primary agent. For the available options, see Model selection.

-

junie_version

The Junie CLI version to install.

-

junie_work_dir

The directory used by Junie CLI for storing its working files, caches, and session artifacts.

/tmp/junie-work

junie_guidelines_filename

The name of a file with Junie's guidelines (e.g. my_guidelines_github.md) that will override the default .junie/AGENTS.md file for the current environment.

AGENTS.md

allowed_mcp_servers

A comma-separated list of MCP servers to enable.

The mcp_github_inline_comment_server MCP server is automatically enabled for pull_request events.

-

Advanced features

Input

Description

Default

resolve_conflicts

Enables Junie to automatically detect and resolve merge conflicts in pull requests.

Always set to false for workflows with manual @junie-agent resolution.

false

silent_mode

Runs Junie in silent mode without repository modifications (committing code, creating branches or pull requests) or user-facing feedback (posting PR/issue or inline comments).

Useful for dry runs, testing, or when Junie is integrated into a larger pipeline where another tool handles the generated results via output parameters.

false

use_single_comment

Reuses and updates a single comment for all Junie runs instead of creating a new comment for every execution.

false

use_structured_prompt

Uses 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

Specifies whether Junie's execution was skipped (due to 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 Junie action.

Example usage of output parameters in the workflow:

- 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"
07 March 2026