feat: trigger review only on ready PR and once#15
Merged
Conversation
There was a problem hiding this comment.
Pratrol Triage Brief: 🟢 High Confidence
Pratrol assessed this pull request across the primary risk vectors below.
| Risk Vector | Score | Tier |
|---|---|---|
| Contributor Context | 72/100 | 🟢 High |
| Logic Risk (Mistral) | 80/100 | 🟢 High |
| Overall Confidence | 77/100 | 🟢 High |
Summary: Adds draft PR support and skips triage for already reviewed PRs.
Key Signal: The change is well-structured and adds meaningful functionality.
Recommendation: Review the new
has_pratrol_reviewmethod for correctness.
Deploying pratrol with
|
| Latest commit: |
a801e4d
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://c30c1002.pratrol.pages.dev |
| Branch Preview URL: | https://feat-trigger-once-ready.pratrol.pages.dev |
14d9c2e to
78a66d3
Compare
78a66d3 to
dfcc2ec
Compare
dfcc2ec to
a801e4d
Compare
There was a problem hiding this comment.
🤖 Code Review
Assessment ✅
All previous comments are addressed. The new changes are correct:
- Draft filtering:
#[serde(default)]ondraftis correct; thematchon action string is the right approach sinceready_for_reviewevents havedraft: falsebut the action is the reliable signal. - Idempotency guard: Pagination logic (
page.items.len() < 100sentinel) is correct.MAX_REVIEW_PAGES = 3cap is intentional and documented. - Bot login:
format!("{}[bot]", app_info.slug)matches GitHub Apps bot login format. fetch_events_count:(n - 1) * 100 + items_lenis correct under GitHub's guarantee that all non-last pages are full.
No new issues found.
Note
Tag @mendral-app with feedback or questions. View session
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Note
Adds draft-PR filtering (skip triage on
openedif draft, trigger onready_for_review), an idempotency guard (has_pratrol_review) scanning up to 3 pages of reviews to detect an existing Pratrol review, bot-login resolution at startup via/app, and aCONTRIBUTIONS_CAPbump from 200 to 300.Written by Mendral for commit a801e4d.