feat(api): add PR labels based on triage tier#14
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 | 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_labelsmethod and ensure it handles errors gracefully.
Deploying pratrol with
|
| Latest commit: |
30079f6
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://4b829260.pratrol.pages.dev |
| Branch Preview URL: | https://feat-add-label.pratrol.pages.dev |
There was a problem hiding this comment.
🤖 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
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 automatic GitHub label creation and application based on triage tier. Introduces
ensure_label(idempotent get-or-create) onGitHubClient, three tier-mapped labels with colors/descriptions onTier, aCommitInfostruct 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 tomockall-generated mocks.Written by Mendral for commit 30079f6.