Code Review #2956
Agentic Workflow file for this run
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
| --- | |
| description: "Review pull request changes for correctness, performance, and consistency with project conventions" | |
| permissions: | |
| contents: read | |
| issues: read | |
| pull-requests: read | |
| network: | |
| allowed: | |
| - defaults | |
| tools: | |
| github: | |
| mode: remote | |
| toolsets: [default, search] | |
| web-fetch: | |
| checkout: | |
| fetch-depth: 50 | |
| safe-outputs: | |
| add-comment: | |
| max: 1 | |
| target: "triggering" | |
| hide-older-comments: true | |
| discussions: false | |
| issues: false | |
| on: | |
| pull_request: | |
| types: [opened, synchronize] | |
| # ############################################################### | |
| # Override the COPILOT_GITHUB_TOKEN secret usage for the workflow | |
| # with a randomly-selected token from a pool of secrets. | |
| # | |
| # As soon as organization-level billing is offered for Agentic | |
| # Workflows, this stop-gap approach will be removed. | |
| # | |
| # See: /.github/actions/select-copilot-pat/README.md | |
| # ############################################################### | |
| # Add the pre-activation step of selecting a random PAT from the supplied secrets | |
| steps: | |
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| name: Checkout the select-copilot-pat action folder | |
| with: | |
| persist-credentials: false | |
| sparse-checkout: .github/actions/select-copilot-pat | |
| sparse-checkout-cone-mode: true | |
| fetch-depth: 1 | |
| - id: select-copilot-pat | |
| name: Select Copilot token from pool | |
| uses: ./.github/actions/select-copilot-pat | |
| env: | |
| SECRET_0: ${{ secrets.COPILOT_PAT_0 }} | |
| SECRET_1: ${{ secrets.COPILOT_PAT_1 }} | |
| SECRET_2: ${{ secrets.COPILOT_PAT_2 }} | |
| SECRET_3: ${{ secrets.COPILOT_PAT_3 }} | |
| SECRET_4: ${{ secrets.COPILOT_PAT_4 }} | |
| SECRET_5: ${{ secrets.COPILOT_PAT_5 }} | |
| SECRET_6: ${{ secrets.COPILOT_PAT_6 }} | |
| SECRET_7: ${{ secrets.COPILOT_PAT_7 }} | |
| SECRET_8: ${{ secrets.COPILOT_PAT_8 }} | |
| SECRET_9: ${{ secrets.COPILOT_PAT_9 }} | |
| # Add the pre-activation output of the randomly selected PAT | |
| jobs: | |
| pre-activation: | |
| outputs: | |
| copilot_pat_number: ${{ steps.select-copilot-pat.outputs.copilot_pat_number }} | |
| # Override the COPILOT_GITHUB_TOKEN expression used in the activation job | |
| # Consume the PAT number from the pre-activation step and select the corresponding secret | |
| engine: | |
| id: copilot | |
| model: claude-opus-4.6 | |
| env: | |
| # We cannot use line breaks in this expression as it leads to a syntax error in the compiled workflow | |
| # If none of the `COPILOT_PAT_#` secrets were selected, then the default COPILOT_GITHUB_TOKEN is used | |
| COPILOT_GITHUB_TOKEN: ${{ case(needs.pre_activation.outputs.copilot_pat_number == '0', secrets.COPILOT_PAT_0, needs.pre_activation.outputs.copilot_pat_number == '1', secrets.COPILOT_PAT_1, needs.pre_activation.outputs.copilot_pat_number == '2', secrets.COPILOT_PAT_2, needs.pre_activation.outputs.copilot_pat_number == '3', secrets.COPILOT_PAT_3, needs.pre_activation.outputs.copilot_pat_number == '4', secrets.COPILOT_PAT_4, needs.pre_activation.outputs.copilot_pat_number == '5', secrets.COPILOT_PAT_5, needs.pre_activation.outputs.copilot_pat_number == '6', secrets.COPILOT_PAT_6, needs.pre_activation.outputs.copilot_pat_number == '7', secrets.COPILOT_PAT_7, needs.pre_activation.outputs.copilot_pat_number == '8', secrets.COPILOT_PAT_8, needs.pre_activation.outputs.copilot_pat_number == '9', secrets.COPILOT_PAT_9, secrets.COPILOT_GITHUB_TOKEN) }} | |
| --- | |
| # Code Review | |
| You are an expert code reviewer for the dotnet/runtime repository. Your job is to review pull request #${{ github.event.pull_request.number }} and post a thorough analysis as a comment. | |
| ## Step 1: Load Review Guidelines | |
| Read the file `.github/skills/code-review/SKILL.md` from the repository. This contains the comprehensive code review process, analysis categories, output format, and verdict rules for dotnet/runtime. | |
| ## Step 2: Review and Post | |
| Follow the instructions in SKILL.md to perform a thorough code review of PR #${{ github.event.pull_request.number }}. When completed, post the review output as a regular comment on the PR using the `add-comment` safe output. |