← Back to Pull requests

ci: fix automerge action for fork PRs and merge queue #37

Merged
codebot-robot merged 1 files (2 lines) on Apr 22, 2026 02:47 UTC
View on GitHub
codebot-robot codebot-robot commented on Apr 22, 2026 02:37 UTC
Author

This PR fixes the automerge action which previously failed when triggered by PRs from forks due to read-only GITHUB_TOKEN restrictions. By moving to the pull_request_target event, the action retains write permissions to enable auto-merge.

It also removes the --merge flag because the main branch utilizes a merge queue, which determines its own merge strategy.

Fixes #36

Diff: 2 lines (+1 / -1) across 1 files Reviewer: mtaufen Review duration: 10m
All Vouch review confidence checks passed
Residual risk 0.02 = Change Risk (0.10) × (1 − Review Confidence (0.76)). Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.10 · 2 lines diff across 1 files
0.10
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.71 · 1 substantive comment(s)
0.71
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
75%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size diff_size
0.066
Real PR Conversation Timeline
3 items
mtaufen mtaufen commented on code on Apr 22, 2026 02:42 UTC
Code Review
.github/workflows/automerge.yaml:1
@@ -26,10 +29,10 @@ permissions:
 jobs:
   automerge:
     runs-on: ubuntu-latest
-    if: github.event.review.state == 'approved'
+    if: '!github.event.pull_request.draft'
     steps:
       - name: Enable automerge
-        run: gh pr merge --auto --merge "$PR_URL"
+        run: gh pr merge --auto "$PR_URL"

Isn't this the only line you needed to change? Everything else looked fine before.

mtaufen mtaufen approved these changes on Apr 22, 2026 02:46 UTC
Approved Reviewer

Approved these changes.

Reviewers
Assignees
codebot-robot codebot-robot
Labels
risk: low confidence: 75.8% reviewed
Vouch Risk Breakdown
AI-powered review risk analysis
Change Risk
Change Risk · Model 1 (XGBoost)
Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
Score: 9.6% (LOW) · Higher = larger blast radius
9.6%
Review Confidence
Review Confidence · Models 2 & 3
Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
Score: 75.8% · Lower = rushed or shallow review
75.8%
Residual Risk
Residual Risk · Core Equation
Residual = Change × (1 − Confidence)
Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
Score: 2.3% · Safe to merge
2.3%