Add major decision auto-approval workflow - #4162
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughA new GitHub Actions workflow runs daily or manually to identify open issues with the auto-approve label, require that it has been present for more than 14 days, and update eligible issues to the approved state. ChangesMajor decision auto-approval
Estimated code review effort: 3 (Moderate) | ~20 minutes Sequence Diagram(s)sequenceDiagram
participant Scheduler
participant Workflow
participant GitHubIssues
participant IssueLabels
Scheduler->>Workflow: Start daily or manual run
Workflow->>GitHubIssues: Find open issues with auto-approve label
GitHubIssues-->>Workflow: Return paginated candidates and label history
Workflow->>GitHubIssues: Revalidate issue state and labels
Workflow->>IssueLabels: Apply approved label
Workflow->>IssueLabels: Remove pending labels
IssueLabels-->>Workflow: Return label update results
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
c56410a to
d954378
Compare
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In @.github/workflows/major-decision-auto-approve.yml:
- Around line 38-94: Wrap each candidate’s processing in the loop over
candidates with a try-catch, covering listEvents, issue re-read, addLabels, and
label removal. On failure, log the candidate number and error with core.warning
or core.error, then continue processing subsequent candidates; preserve the
existing handling of 404 errors in removeLabel.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro Plus
Run ID: 2684fd09-4374-41c4-b3c6-854371d549a6
📒 Files selected for processing (1)
.github/workflows/major-decision-auto-approve.yml
|
The DCO check is failing: commit c56410a has no |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## unstable #4162 +/- ##
============================================
- Coverage 76.82% 76.78% -0.05%
============================================
Files 162 162
Lines 81433 81455 +22
============================================
- Hits 62561 62545 -16
- Misses 18872 18910 +38 🚀 New features to boost your workflow:
|
Signed-off-by: Sarthak Aggarwal <sarthagg@amazon.com>
d954378 to
e7050fc
Compare
Signed-off-by: Sarthak Aggarwal <sarthagg@amazon.com>
|
@ranshid good to merge? |
yes. I approved right? |
Add a daily workflow that finds open issues and pull requests labeled
major-decision-pending-auto-approve. Once the label has remained applied for two weeks, the workflow:major-decision-approvedmajor-decision-pending, if presentmajor-decision-pending-auto-approveThe workflow uses issue events to determine when the auto-approval label was most recently applied, so removing and reapplying the label resets the waiting period. It also re-checks the current labels before making changes and keeps the trigger label until the other label operations succeed.