Resolve merge conflicts
This workflow demonstrates how to use the resolve_conflicts: true parameter to automatically detect and resolve merge conflicts in open PRs when the base branch gets updated.
# .github/workflows/resolve-conflicts.yml
name: Resolve Conflicts
on:
push:
branches:
- main # Add other base branches if needed (master, develop, etc.)
workflow_dispatch: # Triggers Junie CLI from action
inputs:
action:
description: "Action name"
required: true
default: "resolve-conflicts"
prNumber:
description: "PR number"
required: true
jobs:
check-conflicts:
runs-on: ubuntu-latest
permissions:
actions: write
contents: write
pull-requests: write
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Run Junie
id: junie
uses: JetBrains/junie-github-action@main
with:
junie_api_key: ${{ secrets.JUNIE_API_KEY }}
resolve_conflicts: true # Enables automatic conflict detection and resolution in open PRs when the base branch gets updated
26 January 2026