Skip to content

Run PR review only for same-repo PRs #106

Run PR review only for same-repo PRs

Run PR review only for same-repo PRs #106

Workflow file for this run

on:
pull_request:
types: [opened, reopened, synchronize, ready_for_review]
workflow_call:
inputs:
review_prompt:
description: "Review prompt profile to use: connector or general"
required: false
default: connector
type: string
concurrency:
group: pr-review-${{ github.workflow_ref }}-${{ github.event.pull_request.number || github.run_id }}
cancel-in-progress: true
jobs:
pr-review:
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
pull-requests: write
issues: write
steps:
- name: Report skipped review
if: github.event.pull_request.head.repo.full_name != github.repository
run: |
echo "Skipped: Claude review only runs on same-repo PRs."
- name: Checkout PR head
if: github.event.pull_request.head.repo.full_name == github.repository
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd
with:
ref: ${{ github.event.pull_request.head.sha }}
persist-credentials: false
- name: Checkout workflow repo
if: github.event.pull_request.head.repo.full_name == github.repository
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd
with:
repository: ${{ job.workflow_repository }}
ref: ${{ job.workflow_sha }}
path: _workflow
persist-credentials: false
- name: Run PR Review
if: github.event.pull_request.head.repo.full_name == github.repository
uses: ./_workflow/.github/actions/pr-review
with:
anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }}
github_token: ${{ secrets.GITHUB_TOKEN }}
pr_number: ${{ github.event.pull_request.number }}
review_prompt: ${{ github.repository == 'ConductorOne/github-workflows' && 'general' || inputs.review_prompt || 'connector' }}
timeout-minutes: 15