Skip to content

chore: #81 Automatic PR approval#95

Merged
PhilipWoulfe merged 6 commits intomainfrom
chore/#81-pr-approval
Mar 6, 2026
Merged

chore: #81 Automatic PR approval#95
PhilipWoulfe merged 6 commits intomainfrom
chore/#81-pr-approval

Conversation

@PhilipWoulfe
Copy link
Owner

  • Trigger code-quality workflow on pull_request to main
  • Split quality gates into explicit jobs:
    • lint (format + analyzer checks)
    • build (warn-as-error)
  • Add approve-pr job using actions/github-script with secrets.GC_PAT
  • Approve only when lint and build both succeed
  • Block approval when unresolved PR review threads/comments exist
  • Add explicit approval message with verified checks:
    • Linting passed
    • Build passed
    • All review comments resolved
  • Include structured JSON payload in review comment for pipeline parsing
  • Add bot guard conditions to reduce self-trigger/loop risk

Refs: #81

- Trigger code-quality workflow on pull_request to main
- Split quality gates into explicit jobs:
  - lint (format + analyzer checks)
  - build (warn-as-error)
- Add approve-pr job using actions/github-script with secrets.GC_PAT
- Approve only when lint and build both succeed
- Block approval when unresolved PR review threads/comments exist
- Add explicit approval message with verified checks:
  - Linting passed
  - Build passed
  - All review comments resolved
- Include structured JSON payload in review comment for pipeline parsing
- Add bot guard conditions to reduce self-trigger/loop risk

Refs: #81
Copilot AI review requested due to automatic review settings March 6, 2026 12:52
Copy link
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

This PR implements the GitHub Automated Reviewer (GC) capability from Issue #81. It restructures the code-quality workflow to separate lint and build into distinct jobs, adds analyzer warnings checking to the lint job, upgrades builds to use /warnaserror, and introduces an approve-pr job that auto-approves PRs when all quality gates pass and all review threads are resolved.

Changes:

  • Split the single lint+build job into separate lint and build jobs (with build depending on lint), adding analyzer warning checks and explicit /warnaserror flags
  • Added approve-pr job that uses actions/github-script with a dedicated PAT (GC_PAT) to auto-approve PRs, including GraphQL-based unresolved review thread detection and structured JSON output
  • Added bot guard conditions and branch filtering (main) to prevent self-triggering loops

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copilot AI review requested due to automatic review settings March 6, 2026 13:07
Copy link
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 1 out of 1 changed files in this pull request and generated no new comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@PhilipWoulfe PhilipWoulfe merged commit 860b516 into main Mar 6, 2026
6 checks passed
@PhilipWoulfe PhilipWoulfe deleted the chore/#81-pr-approval branch March 6, 2026 13:17
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