Skip to content

Add code-review agentic workflow#126066

Merged
stephentoub merged 4 commits intodotnet:mainfrom
stephentoub:dev/stoub/code-review-workflow
Mar 25, 2026
Merged

Add code-review agentic workflow#126066
stephentoub merged 4 commits intodotnet:mainfrom
stephentoub:dev/stoub/code-review-workflow

Conversation

@stephentoub
Copy link
Copy Markdown
Member

Note

This PR was generated with the help of GitHub Copilot.

Add code-review agentic workflow

This adds a new agentic workflow (.github/workflows/code-review.md) that automatically reviews pull requests using the repository's code-review skill.

What it does

  • Triggers on pull_request events (opened, synchronize) — i.e., new PRs and new pushes to existing PRs
  • Reads .github/skills/code-review/SKILL.md at runtime for the full review process, analysis categories, output format, and verdict rules
  • Posts a structured review comment on the PR via add-comment safe output
  • Minimizes previous review comments when a new commit is pushed (hide-older-comments: true)

Configuration

  • Read-only agent permissions (contents: read, issues: read, pull-requests: read)
  • All writes go through safe-outputs (single add-comment with max: 1)
  • Includes the mandatory Copilot PAT pool integration
  • GitHub MCP tools (toolsets: [default]) for reading PR diffs, files, and metadata

Add an agentic workflow that runs on pull_request opened/synchronize events.
It reads the code-review skill (SKILL.md) and posts a structured review
comment on the PR using safe-outputs.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@dotnet-policy-service
Copy link
Copy Markdown
Contributor

Tagging subscribers to this area: @dotnet/runtime-infrastructure
See info in area-owners.md if you want to be subscribed.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds a new GitHub Agentic Workflow that runs the repository’s code-review skill automatically on PR updates and posts the results as a PR comment, with Copilot PAT pool integration and a compiled .lock.yml artifact.

Changes:

  • Introduce .github/workflows/code-review.md agentic workflow definition (triggered on PR opened/synchronize).
  • Add compiled workflow artifact .github/workflows/code-review.lock.yml.
  • Update .github/aw/actions-lock.json to include github/gh-aw-actions/setup@v0.63.1.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.

File Description
.github/workflows/code-review.md Defines the agentic “Code Review” workflow, safe-outputs policy, triggers, and prompt instructions.
.github/workflows/code-review.lock.yml Generated/compiled workflow that will actually execute in GitHub Actions.
.github/aw/actions-lock.json Locks the gh-aw setup action version used by the compiled workflow.

Comment thread .github/workflows/code-review.lock.yml
Comment thread .github/workflows/code-review.md
Comment thread .github/workflows/code-review.lock.yml
stephentoub and others added 2 commits March 24, 2026 21:28
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings March 25, 2026 01:30
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

Comment thread .github/workflows/code-review.md
Comment thread .github/workflows/code-review.md
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@stephentoub stephentoub merged commit ed43860 into dotnet:main Mar 25, 2026
23 checks passed
@stephentoub stephentoub deleted the dev/stoub/code-review-workflow branch March 25, 2026 01:40
issues: false

on:
pull_request:
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

You might also want workflow_dispatch to be able to force it to run

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

How does one force it to run?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

BTW, as it is I can successfully rerun in the azdo UI like any other job in CI:

Image

Copy link
Copy Markdown
Member

@jeffhandley jeffhandley left a comment

Choose a reason for hiding this comment

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

Looks good!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

6 participants