Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion .github/workflows/ai-guarded-review.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ on:
jobs:
# Step 1: Check if PR was already reviewed
check-label:
name: Check reviewed label
runs-on: ubuntu-latest
outputs:
already-reviewed: ${{ steps.check.outputs.already-reviewed }}
Expand All @@ -83,6 +84,7 @@ jobs:

# Step 2: Check team membership only if label is absent
check-membership:
name: Check team membership
runs-on: ubuntu-latest
needs: check-label
if: needs.check-label.outputs.already-reviewed != 'true'
Expand Down Expand Up @@ -132,6 +134,7 @@ jobs:

# Step 3: Evaluate guard
gate:
name: Evaluate guard
runs-on: ubuntu-latest
needs: [check-label, check-membership]
if: always()
Expand All @@ -154,6 +157,7 @@ jobs:

# Step 4: Guard failed — remove trigger label and fail
guard-failed:
name: Guard failed
needs: gate
if: needs.gate.outputs.can-run != 'true'
runs-on: ubuntu-latest
Expand All @@ -170,6 +174,7 @@ jobs:

# Step 5: Run Claude review
ai-review:
name: Claude AI review
needs: gate
if: needs.gate.outputs.can-run == 'true'
runs-on: ubuntu-latest
Expand All @@ -180,7 +185,7 @@ jobs:
GH_TOKEN: ${{ secrets.github-token }}
PR_NUMBER: ${{ inputs.pr-number }}
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v6
with:
fetch-depth: 0

Expand Down