feat: add low-risk PR self-approval workflows#245
Merged
rogeriochaves merged 3 commits intomainfrom Mar 4, 2026
Merged
Conversation
Add three GitHub Actions workflows and a policy document to enable self-approval of low-risk PRs (e.g. test config, docs, formatting): - approval-or-hotfix.yml: enforces that PRs need either 1 approval or a "hotfix"/"low-risk-change" label - low-risk-evaluation.yml: AI-powered evaluation of PR diffs against the low-risk policy, auto-labels qualifying PRs - low-risk-label-reset.yml: removes the label when new commits are pushed, requiring re-evaluation - docs/LOW_RISK_PULL_REQUESTS.md: documents the policy criteria Ported from langwatch/langwatch with minor adjustments for this repo.
Add opened, reopened, and synchronize to the pull_request trigger types so the check re-runs after rebases and new commits instead of going stale and blocking merge.
- Trigger evaluation automatically on PR open/reopen/synchronize instead of requiring manual workflow_dispatch - Fold label reset into the evaluation workflow (remove stale label first, then re-evaluate fresh) — deletes separate label-reset workflow - Use LOW_RISK_OPENAI_API_KEY secret for cost tracking - Keep workflow_dispatch as fallback for manual runs - Use gpt-4.1-mini instead of gpt-5-mini
Contributor
|
Automated low-risk assessment This PR was evaluated against the repository's Low-Risk Pull Requests procedure and does not qualify as low risk.
This PR requires a manual review before merging. |
sergioestebance
approved these changes
Mar 4, 2026
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.
Summary
approval-or-hotfix.yml— enforces PRs need either 1 approval or ahotfix/low-risk-changelabellow-risk-evaluation.yml— AI-powered (GPT-5-mini) evaluation of PR diffs against the low-risk policy, auto-labels qualifying PRslow-risk-label-reset.yml— removes thelow-risk-changelabel when new commits are pushed, requiring re-evaluationdocs/LOW_RISK_PULL_REQUESTS.md— documents the low-risk change policy criteriaPorted from
langwatch/langwatchwith minor adjustments (restricted paths adapted for this repo, added "test configuration" as an explicit low-risk category).How it works
low-risk-changelabel is applied and a comment explains the assessmentapproval-or-hotfixcheck passes, allowing merge without manual approvalTest plan
OPENAI_API_KEYsecret to be configured in the repo for the evaluation workflowlow-risk-changelabel needs to be created in the repo's label settings