Skip to content

feat(api): add PR labels based on triage tier#14

Merged
ljahier merged 3 commits into
mainfrom
feat/add_label
Mar 2, 2026
Merged

feat(api): add PR labels based on triage tier#14
ljahier merged 3 commits into
mainfrom
feat/add_label

Conversation

@ljahier
Copy link
Copy Markdown
Member

@ljahier ljahier commented Mar 1, 2026


Note

Adds automatic GitHub label creation and application based on triage tier. Introduces ensure_label (idempotent get-or-create) on GitHubClient, three tier-mapped labels with colors/descriptions on Tier, a CommitInfo struct carrying SHA alongside message (needed to anchor reviews to a specific commit), and migrates all manual HTTP calls to typed octocrab API methods. Tests are migrated to mockall-generated mocks.

Written by Mendral for commit 30079f6.

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 70/100 🟢 High
Logic Risk (Mistral) 86/100 🟢 High
Overall Confidence 79/100 🟢 High

Summary: Added functionality to label PRs based on triage tier.

Key Signal: The change is well-structured and follows the existing codebase patterns.

Recommendation: Review the new add_labels method and ensure it handles errors gracefully.

mendral-app[bot]

This comment was marked as outdated.

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

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

Deploying pratrol with  Cloudflare Pages  Cloudflare Pages

Latest commit: 30079f6
Status: ✅  Deploy successful!
Preview URL: https://4b829260.pratrol.pages.dev
Branch Preview URL: https://feat-add-label.pratrol.pages.dev

View logs

mendral-app[bot]

This comment was marked as outdated.

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 ✅

Both previous comments are resolved. The TOCTOU race in ensure_label is correctly fixed: a 422 on create_label is now treated as success, making the operation idempotent under concurrent triage runs. The incremental diff introduces no new issues. LGTM.

Note

Tag @mendral-app with feedback or questions. View session

@ljahier ljahier merged commit bccae0f into main Mar 2, 2026
6 checks passed
@ljahier ljahier deleted the feat/add_label branch March 2, 2026 00:37
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.

1 participant