diff --git a/.github/workflows/review.yml b/.github/workflows/review.yml new file mode 100644 index 00000000..a11d6846 --- /dev/null +++ b/.github/workflows/review.yml @@ -0,0 +1,32 @@ +# Managed by `roachdev codereview`: triggers roachdev's reusable AI PR review. +name: Roachdev AI PR Review + +on: + pull_request_target: + types: [opened, synchronize, ready_for_review] + workflow_dispatch: + inputs: + pr_number: + description: "PR number to review" + required: true + type: number + +concurrency: + group: review-${{ github.event.pull_request.number || github.event.inputs.pr_number }} + cancel-in-progress: true + +jobs: + ai-review: + permissions: + contents: read + pull-requests: write + id-token: write + if: > + github.event_name == 'workflow_dispatch' || + (github.event.action == 'synchronize' && !github.event.pull_request.draft) || + (github.event.action == 'opened' && !github.event.pull_request.draft) || + github.event.action == 'ready_for_review' + uses: cockroachlabs/roachdev/.github/workflows/ai-review.yml@main + with: + pr_number: ${{ fromJSON(github.event.inputs.pr_number || github.event.pull_request.number) }} + secrets: inherit