Skip to content

fix: use correct API to invoke Copilot code review in doc-review workflow#6918

Merged
jstirnaman merged 4 commits intomasterfrom
copilot/fix-copilot-review-invocation
Mar 10, 2026
Merged

fix: use correct API to invoke Copilot code review in doc-review workflow#6918
jstirnaman merged 4 commits intomasterfrom
copilot/fix-copilot-review-invocation

Conversation

Copy link
Contributor

Copilot AI commented Mar 10, 2026

The copilot-review job was calling gh pr edit --add-reviewer "copilot-reviews" — a command that silently succeeds but never triggers GitHub Copilot code review. Separately, the visual review comment used @copilot, which is not a valid Copilot handle in PR comments.

Changes

  • copilot-review job: Replace shell command with actions/github-script calling pulls.requestReviewers with copilot-pull-request-reviewer — the correct reviewer identifier for Copilot code review. Adds graceful error handling that surfaces a link to the repository ruleset config if the API call fails.

    - name: Request Copilot review
      uses: actions/github-script@...
      with:
        script: |
          await github.rest.pulls.requestReviewers({
            owner: context.repo.owner,
            repo: context.repo.repo,
            pull_number: prNumber,
            reviewers: ['copilot-pull-request-reviewer'],
          });
  • copilot-visual-review job: Replace @copilot with @github-copilot, the correct handle for invoking Copilot in PR/issue comments.


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

…kflow

Co-authored-by: jstirnaman <212227+jstirnaman@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix Copilot review invocation in Doc Review workflow fix: use correct API to invoke Copilot code review in doc-review workflow Mar 10, 2026
@jstirnaman jstirnaman marked this pull request as ready for review March 10, 2026 16:53
@jstirnaman jstirnaman requested a review from a team as a code owner March 10, 2026 16:53
@jstirnaman jstirnaman requested review from jstirnaman and removed request for a team March 10, 2026 16:53
@jstirnaman jstirnaman merged commit 3952e3b into master Mar 10, 2026
2 checks passed
@jstirnaman jstirnaman deleted the copilot/fix-copilot-review-invocation branch March 10, 2026 17:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants