Support optional formal PR review decisions (APPROVE / REQUEST_CHANGES) #27
Labels
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
nimmo/forgejo-auto-pr-review#27
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
Extend the reviewer to optionally submit formal pull request review decisions (
APPROVE,REQUEST_CHANGES, orCOMMENT) via the Forgejo reviews API, governed by explicit repository configuration.Context & Motivation
Currently, the reviewer publishes findings as an advisory markdown issue comment (
issues/{number}/comments). Issue #19 describes publishing formal reviews with theCOMMENTevent. For automated workflows where a passing review could unblock branch protection or merge requirements, repositories may want the bot to submitAPPROVEwhen clean, orREQUEST_CHANGESwhen blocking defects are detected.Because automated reviewers can produce false positives or partial analyses, this capability must be strictly opt-in and configurable per repository.
Proposed Configuration
In
.forgejo/ai-review.yml:Scope
publish()inreviewer.pyto supportPOST /api/v1/repos/{owner}/{repo}/pulls/{number}/reviews.Ready to mergevsRequires further work) to Forgejo review events:allow_approval: trueand verdict is "Ready to merge": eventAPPROVE.allow_request_changes: trueand blocking findings exist: eventREQUEST_CHANGES.COMMENT.formal_review: false.Acceptance Criteria
formal_review: falseretains the current advisory comment behavior without behavioral change.APPROVEreview event and blocking reviews submitREQUEST_CHANGES.allow_approval: false, formal_review: true->COMMENT).