Skip to content

feat: trigger review only on ready PR and once#15

Merged
ljahier merged 1 commit into
mainfrom
feat/trigger-once-ready
Mar 2, 2026
Merged

feat: trigger review only on ready PR and once#15
ljahier merged 1 commit into
mainfrom
feat/trigger-once-ready

Conversation

@ymelois
Copy link
Copy Markdown
Contributor

@ymelois ymelois commented Mar 1, 2026


Note

Adds draft-PR filtering (skip triage on opened if draft, trigger on ready_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 a CONTRIBUTIONS_CAP bump from 200 to 300.

Written by Mendral for commit a801e4d.

Copy link
Copy Markdown

@pratrol pratrol Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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_review method for correctness.

@cloudflare-workers-and-pages
Copy link
Copy Markdown

cloudflare-workers-and-pages Bot commented Mar 1, 2026

Deploying pratrol with  Cloudflare Pages  Cloudflare Pages

Latest commit: a801e4d
Status: ✅  Deploy successful!
Preview URL: https://c30c1002.pratrol.pages.dev
Branch Preview URL: https://feat-trigger-once-ready.pratrol.pages.dev

View logs

mendral-app[bot]

This comment was marked as outdated.

@ymelois ymelois force-pushed the feat/trigger-once-ready branch from 14d9c2e to 78a66d3 Compare March 1, 2026 14:51
mendral-app[bot]

This comment was marked as outdated.

@ljahier ljahier force-pushed the feat/trigger-once-ready branch from 78a66d3 to dfcc2ec Compare March 2, 2026 01:11
mendral-app[bot]

This comment was marked as outdated.

@ljahier ljahier force-pushed the feat/trigger-once-ready branch from dfcc2ec to a801e4d Compare March 2, 2026 01:13
Copy link
Copy Markdown

@mendral-app mendral-app Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤖 Code Review

Assessment ✅

All previous comments are addressed. The new changes are correct:

  • Draft filtering: #[serde(default)] on draft is correct; the match on action string is the right approach since ready_for_review events have draft: false but the action is the reliable signal.
  • Idempotency guard: Pagination logic (page.items.len() < 100 sentinel) is correct. MAX_REVIEW_PAGES = 3 cap is intentional and documented.
  • Bot login: format!("{}[bot]", app_info.slug) matches GitHub Apps bot login format.
  • fetch_events_count: (n - 1) * 100 + items_len is 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

@ljahier ljahier merged commit 8c83c73 into main Mar 2, 2026
6 checks passed
@ljahier ljahier deleted the feat/trigger-once-ready branch March 2, 2026 01:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants