Junie Help

YouTrack integration

Trigger Junie GitHub Action from issues and issue comments in JetBrains YouTrack.

How it works

Junie app for YouTrack adds a Run Junie widget button to the issues in your YouTrack project. Clicking this button — or alternatively, tagging Junie by a trigger name in a comment to the issue — dispatches the junie-youtrack.yml GitHub workflow.

Junie receives the issue details and context (ID, title, description, comments, and attachments), implements the changes based on the issue description (or the trigger comment, if provided), and creates a GitHub PR with the changes.

Junie posts a comment to the YouTrack issue to inform you that it has started working, and when finished, updates this comment with the task result (a link to the GitHub PR or error details).

Setup

Step 1: Create a YouTrack user for Junie

  1. In your YouTrack instance, go to Administration → Access Management → Users, click New User and set up the parameters for the new Junie user as follows:

    • Login: junie.

    • Full name: Junie.

    • Email: any valid email address.

    • Permissions: at a minimum, read issues and create/update comments.

  2. Log in as the new user (or use an admin token to impersonate) and go to ProfileAuthenticationPermanent Tokens.

  3. Click New token and generate a token with the following parameters:

    • Name: Junie GitHub Integration.

    • Scope: YouTrack scope with read/write access to issues and comments.

    You'll need this generated token when configuring the GitHub project as a value for the YOUTRACK_TOKEN secret.

Step 2: Configure the GitHub project

  1. Add the YOUTRACK_TOKEN secret created at step 1 to your GitHub repository in SettingsSecrets and variablesActions.

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

    name: Junie YouTrack Integration on: workflow_dispatch: inputs: action: description: 'Action type' default: 'youtrack_event' required: true type: string issue_id: description: 'YouTrack issue ID (e.g., PROJ-123)' required: true type: string issue_url: description: 'Full URL to the YouTrack issue' required: false type: string issue_title: description: 'YouTrack issue summary/title' required: true type: string issue_description: description: 'YouTrack issue description' required: false type: string issue_comments: description: 'YouTrack issue comments (plain text)' required: false type: string trigger_comment: description: 'Optional comment that triggered Junie (used as user instruction)' required: false type: string youtrack_base_url: description: 'YouTrack instance base URL (e.g., https://youtrack.example.com)' required: true type: string jobs: junie: runs-on: ubuntu-latest permissions: contents: write pull-requests: write issues: write if: ${{ inputs.action == 'youtrack_event' }} steps: - name: Checkout repository uses: actions/checkout@v4 with: fetch-depth: 1 - name: Run Junie uses: JetBrains/junie-github-action@v1 with: junie_api_key: ${{ secrets.JUNIE_API_KEY }} youtrack_token: ${{ secrets.YOUTRACK_TOKEN }}

Step 3: Install and configure the Junie YouTrack app

  1. Install the Junie app for YouTrack. The app handles the workflow dispatch automatically — no custom scripting is required.

  2. In your YouTrack project, go to Apps → Junie → Settings and configure:

    • GitHub Token (required): Your personal access token with the workflow permission.

    • Trigger Name (optional): The phrase that triggers Junie when a comment starts with it. Defaults to @junie. Change it to e.g. /junie if you prefer a slash command style.

    • Default Branch (optional): The branch on which the workflow will be triggered. If not set, the app fetches the repository's default branch via the GitHub API. Defaults to main if it cannot be determined.

  3. In your YouTrack project, go to Settings → Version Control and add a GitHub VCS integration pointing to the target repository.

Once set up, a Run Junie button appears on every issue in the configured YouTrack project.

Clicking this button — or alternatively, tagging Junie by its trigger name in a comment to the issue — dispatches the junie-youtrack.yml workflow with the issue data automatically.

27 March 2026