Repository navigation
Conversation
This workflow assesses pull requests for review requirements based on file changes and documentation significance. It classifies changed files, determines if AI assessment is needed, and enforces review requirements accordingly. Signed-off-by: Anna Sancho Vaquer <anna.sanchovaquer@canonical.com>
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
The workflow is currently ignored because it has no supported YAML filename extension.
Review effort: Lite
Findings: 1
Open (1)
What changed in this PR
Adds an automated GitHub Actions workflow to assess pull-request review requirements, including approval counting, AI escalation, labels, and summary comments.
Changes:
- Classifies changed files and documentation significance.
- Calculates required approvals and current approval status.
- Manages review labels and pull-request comments.
| File | Summary |
|---|---|
.github/workflows/review-requirements |
Implements review assessment and enforcement, but must be renamed with a .yml or .yaml extension for GitHub Actions to discover it. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Signed-off-by: Anna Sancho Vaquer <anna.sanchovaquer@canonical.com>
Review requirement: 2 approvals needed
Current approvals: 0 / 2 |
Signed-off-by: Anna Sancho Vaquer <anna.sanchovaquer@canonical.com>
cjdcordeiro
left a comment
There was a problem hiding this comment.
At first glance, this seems like using a sledgehammer to crack a nut 😅
And I also doubt it works cause there's no secrets being used, even though AI models are being called.
Note that my comment is not about the size or complexity of the workflow, but rather the level of customization we'd have to maintain.
Instead, why not something as simple as:
review-requirements.md
---
on:
pull_request:
types: [opened, synchronize, reopened, ready_for_review]
pull_request_review:
types: [submitted, dismissed]
permissions:
contents: read
pull-requests: write
issues: write
models: read
safe-outputs:
add-reviewer:
allowed-reviewers: [..., ...]
---
# Pull Request Review Requirements
<prompt.....>and the you use gh aw ... to generate the actual GitHub workflow and commit it

This pull request introduces a new GitHub Actions workflow to automatically assess and enforce review requirements for pull requests. The workflow analyzes the nature of changes (such as new files or significant documentation updates), uses AI to judge the significance of documentation changes, and updates PR labels and comments to reflect the required number of reviews. It also summarizes current approvals and escalates requirements when necessary.
Automated Review Requirement Assessment:
.github/workflows/review-requirementsthat determines if a pull request requires one or two approvals based on the presence of new files or significant documentation changes.AI-Powered Documentation Significance Judgement:
Dynamic Label and Comment Management:
reviews-required-1,reviews-required-2,reviews-ai-escalated) on pull requests to indicate the current review requirement and AI escalation status.