diff --git a/.github/workflows/coderabbit-trigger.yml b/.github/workflows/coderabbit-trigger.yml deleted file mode 100644 index 3bc9be3..0000000 --- a/.github/workflows/coderabbit-trigger.yml +++ /dev/null @@ -1,46 +0,0 @@ ---- -name: CodeRabbit -on: - workflow_call: - inputs: - pr_number: - required: true - type: number - -jobs: - trigger-coderabbit: - runs-on: ubuntu-latest - if: github.actor == 'dependabot[bot]' || github.actor == 'submariner-bot' - permissions: - contents: write - pull-requests: write - steps: - - uses: actions/github-script@v8 - with: - script: | - const owner = context.repo.owner; - const repo = context.repo.repo; - const issue_number = ${{ inputs.pr_number }}; - - // Fetch PR details to check the base branch - const { data: pr } = await github.rest.pulls.get({ - owner, - repo, - pull_number: issue_number - }); - - console.log(`PR #${issue_number} base branch: ${pr.base.ref}`); - - // Only add comment if the PR is targeting the devel branch - if (pr.base.ref === 'devel') { - const triggerComment = '@coderabbitai review'; - await github.rest.issues.createComment({ - owner, - repo, - issue_number, - body: triggerComment - }); - console.log('CodeRabbit review comment posted.'); - } else { - console.log(`Skipping CodeRabbit comment - PR is targeting ${pr.base.ref}, not devel`); - }