Skip to content

feat: Add review requirements workflow for pull requests - #93

Open
asanvaq wants to merge 6 commits into
mainfrom
ROCKS-3568-chisel-ai-reviewers
Open

asanvaq wants to merge 6 commits into
mainfrom
ROCKS-3568-chisel-ai-reviewers

Conversation

@asanvaq

@asanvaq asanvaq commented Oct 5, 2026 •

Copy link
Copy Markdown
Contributor

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:

  • Adds a new workflow .github/workflows/review-requirements that determines if a pull request requires one or two approvals based on the presence of new files or significant documentation changes.
  • Implements logic to classify changed files and documentation edits, and uses thresholds to decide when additional reviews are necessary.

AI-Powered Documentation Significance Judgement:

  • Integrates an AI model to assess the semantic significance of documentation changes, escalating review requirements if the changes are deemed significant.

Dynamic Label and Comment Management:

  • Automatically adds or removes labels (e.g., reviews-required-1, reviews-required-2, reviews-ai-escalated) on pull requests to indicate the current review requirement and AI escalation status.
  • Posts or updates a summary comment on the pull request, showing the required number of approvals, current approval count, and explanation for the requirement.

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>
@asanvaq
asanvaq marked this pull request as ready for review October 5, 2026 07:28
@asanvaq
asanvaq requested a lite review from Copilot October 5, 2026 07:28

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot review overview

🟡 Changes recommended

The workflow is currently ignored because it has no supported YAML filename extension.

Review effort: Lite
Findings: 1 High severity

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.

Comment thread .github/workflows/review-requirements.yml
Signed-off-by: Anna Sancho Vaquer <anna.sanchovaquer@canonical.com>
@github-actions

github-actions Bot commented Oct 5, 2026 •

Copy link
Copy Markdown

Review requirement: 2 approvals needed

  • new doc file: .github/skills/agentic-workflows/SKILL.md
  • new doc file: .github/workflows/review-requirements.md

Current approvals: 0 / 2

Signed-off-by: Anna Sancho Vaquer <anna.sanchovaquer@canonical.com>

@cjdcordeiro cjdcordeiro left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

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

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants