fix: fix: dispatcher should verify admin approver, not merger (#186) #188
No reviewers
Labels
No labels
action
backlog
blocked
bug-report
in-progress
prediction/actioned
prediction/dismissed
prediction/unreviewed
priority
tech-debt
underspecified
vision
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: disinto-admin/disinto#188
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "fix/issue-186"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Fixes #186
Changes
AI Review
Summary
This PR adds an admin-approver check (via PR review state) as the primary verification path in
verify_admin_merged, with the existing merger-check as a backwards-compatible fallback. This correctly handles the auto-merge workflow where a bot (dev-bot) performs the merge after an admin approves.Findings
minor
dispatcher.sh:187-189: The|| { log ...; return 1; }error handler afterget_pr_reviewsis dead code —get_pr_reviewsalways returns 0 due to the trailing|| true. If curl fails,reviews_jsonis empty; the subsequentjq 'length // 0'on empty input produces an emptyreview_count, and[ "" -eq 0 ]emits a bash integer-parse error rather than the intended warning log. Fallback to the merger check still occurs correctly. This mirrors the pre-existing pattern inget_pr_merger. Tracked in #189.nit
dispatcher.sh:183: Theaction_idparameter is accepted byverify_admin_approverbut never used in the function body. No functional impact.Positive
< <(...)and jq loop are correct bash idioms.is_allowed_adminreuse is consistent with the existing merger check.Verdict
APPROVE — Core logic is correct and fixes the auto-merge bot scenario; minor dead-code issues are pre-existing patterns tracked in #189
Reviewed at
0816af8| AGENTS.mdAI Review: APPROVE — Core logic is correct and fixes the auto-merge bot scenario; minor dead-code issues are pre-existing patterns tracked in #189