Add automatically-request-copilot-review.yaml workflow
#2
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 }}" |