Skip to content

Add automatically-request-copilot-review.yaml workflow #2

Add automatically-request-copilot-review.yaml workflow

Add automatically-request-copilot-review.yaml workflow #2

name: Automatic Copilot Code Review
on:
pull_request:
types:
- opened # brand-new PRs
- ready_for_review # PR drafts marked "Ready for review"
- reopened # PRs that were closed then reopened
- synchronize # PRs updated with new commits
jobs:
add-copilot-to-pr-reviews:
name: "Add Copilot to PR reviews"
if: ${{ github.event.pull_request.draft == false }} # skip still-draft PRs
runs-on: ubuntu-latest
env:
GH_TOKEN: ${{ secrets.GH_TOKEN_COPILOT_REVIEW }} # gh CLI picks this up automatically
steps:
- name: Install gh-copilot-review extension
run: gh extension install ChrisCarini/gh-copilot-review
- name: Ask Copilot to review this PR
run: gh copilot-review "${{ github.event.pull_request.html_url }}"