Skip to content

chore: Prompt Coderabbit to have issue requirement context #859

chore: Prompt Coderabbit to have issue requirement context

chore: Prompt Coderabbit to have issue requirement context #859

name: Merge Conflict Bot
on:
pull_request_target:
types: [opened, synchronize, reopened]
push:
branches:
- main
workflow_dispatch:
inputs:
dry_run:
description: 'Run in dry-run mode (no comments or status updates)'
type: boolean
default: true
permissions:
contents: read
pull-requests: write
issues: write
statuses: write
concurrency:
group: "check-conflicts-${{ github.event.pull_request.number || github.sha }}"
cancel-in-progress: true
jobs:
check-conflicts:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
with:
ref: ${{ github.event.repository.default_branch }}
- name: Harden the runner
uses: step-security/harden-runner@20cf305ff2072d973412fa9b1e3a4f227bda3c76 # v2.14.0
with:
egress-policy: audit
- name: Check for merge conflicts
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0
env:
DRY_RUN: ${{ inputs.dry_run || 'false' }}
with:
script: |
const path = require('path')
const scriptPath = path.join(process.env.GITHUB_WORKSPACE, '.github/scripts/bot-merge-conflict.js')
console.log(`Loading script from: ${scriptPath}`)
const script = require(scriptPath)
await script({github, context, core})