Skip to content

chore: add AI PR Review to github-workflows self-CI#280

Closed
JesperTerkelsen wants to merge 1 commit intomainfrom
chore/add-ai-pr-review
Closed

chore: add AI PR Review to github-workflows self-CI#280
JesperTerkelsen wants to merge 1 commit intomainfrom
chore/add-ai-pr-review

Conversation

@JesperTerkelsen
Copy link
Copy Markdown
Member

@JesperTerkelsen JesperTerkelsen commented May 1, 2026

Summary

Adds the same AI PR Review workflow we run on the service repos (service-control, service-vehicle, service-api-gateways, etc.) to this repo's own self-CI, so PRs against the shared workflows also get an automated code review.

Why here too

This repo's CI currently only runs actionlint (syntactic). Every change here ripples to every Monta service that consumes the shared workflows, so an extra layer of intent/content review on top of actionlint has obvious value:

What it adds

A single new file: .github/workflows/ai-pr-review.yml. Pattern matches service-vehicle and service-api-gateways plus run-on-drafts: true:

name: AI PR Review

on:
  pull_request:
    types: [opened, ready_for_review, synchronize]
  issue_comment:
    types: [created]

jobs:
  ai-review:
    uses: monta-app/ai-standards/.github/workflows/ai-pr-review.yml@main
    with:
      run-on-drafts: true
    secrets:
      ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}
      AI_REVIEWER_SECRET_KEY: ${{ secrets.AI_REVIEWER_SECRET_KEY }}

run-on-drafts: true is intentional for this repo specifically — changes here usually start as drafts while we test against downstream service repos before promoting them. We want the AI review during that draft phase, not just after promotion.

Prerequisites

The workflow expects ANTHROPIC_API_KEY and AI_REVIEWER_SECRET_KEY secrets to be available. If they're already configured at the org level (which is how the service repos pick them up), this should "just work" the moment the PR merges. If not, the org admin will need to grant this repo access to those secrets.

Test plan

  • After merge, open a tiny draft test PR and confirm the ai-review / AI Review check shows up and runs (not just on ready-for-review)

🤖 Generated with Claude Code

Drops in the same shared workflow we use across the Kotlin/TS service
repos (service-control, service-vehicle, service-api-gateways, etc.)
so PRs to this repo also get an automated AI code review.

Same pattern as service-vehicle and service-api-gateways:
- Triggers on opened, ready_for_review, synchronize, and issue_comment
- Delegates to monta-app/ai-standards/.github/workflows/ai-pr-review.yml@main
- Uses the org-level ANTHROPIC_API_KEY + AI_REVIEWER_SECRET_KEY secrets

Sets run-on-drafts: true so reviews fire on draft PRs as well — useful
for this repo specifically because changes here usually start as drafts
while we test against downstream service repos before promoting.

The actionlint check in pull-request.yml already covers static workflow
syntax; this layers a content/intent review on top, which is useful for
a repo where every change ripples to every Monta service.
@JesperTerkelsen JesperTerkelsen force-pushed the chore/add-ai-pr-review branch from b2a9046 to b30ff52 Compare May 1, 2026 23:52
@JesperTerkelsen JesperTerkelsen marked this pull request as ready for review May 1, 2026 23:52
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.

1 participant