Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 29 additions & 0 deletions .github/workflows/copilot-pull-request-reviewer.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Copilot pull request reviewer

on:
pull_request:
types: [opened, synchronize, reopened]

Comment on lines +3 to +6
Copy link

Copilot AI Apr 13, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This workflow is triggered via pull_request but it depends on ${{ secrets.OPENAI_API_KEY }}. For pull requests coming from forks, GitHub Actions does not provide repository secrets, so the reviewer step will fail or be skipped. If you want this reviewer to work on fork PRs, consider using a pull_request_target-based design that avoids checking out/running untrusted PR code, or gate the job so it only runs when the secret is available (and/or when github.event.pull_request.head.repo.full_name == github.repository).

Copilot uses AI. Check for mistakes.
permissions:
contents: read
pull-requests: write

jobs:
review:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Review with Copilot
uses: github/copilot-pr-reviewer@v1
Copy link

Copilot AI Apr 13, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The workflow grants pull-requests: write and uses a third-party action. Please pin github/copilot-pr-reviewer to an immutable commit SHA (instead of @v1) to reduce supply-chain risk from tag updates.

Suggested change
uses: github/copilot-pr-reviewer@v1
uses: github/copilot-pr-reviewer@<FULL_40_CHARACTER_COMMIT_SHA>

Copilot uses AI. Check for mistakes.
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
with:
model: gpt-4.1
max_tokens: 4096
temperature: 0.7

Loading