feat: add colorful label colors to sync-pr-labels workflow#57
feat: add colorful label colors to sync-pr-labels workflow#57Aarya-Chaudhari wants to merge 2 commits intoAOSSIE-Org:mainfrom
Conversation
|
Warning Rate limit exceeded
Your organization is not enrolled in usage-based pricing. Contact your admin to enable usage-based pricing to continue reviews beyond the rate limit, or try again in 53 minutes and 54 seconds. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (1)
WalkthroughA new workflow step was added to initialize and synchronize GitHub PR labels by upserting predefined labels through API calls. Inline comments and blank lines were removed for code cleanup, with no changes to label detection, application logic, or synchronization mechanisms. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Poem
🚥 Pre-merge checks | ✅ 2✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
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 |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In @.github/workflows/sync-pr-labels.yml:
- Around line 50-67: The catch currently calls github.rest.issues.createLabel
for all exceptions from github.rest.issues.updateLabel, which hides real errors;
change the handler to detect a 404 Not Found only (check the thrown error's
status property, e.g., e.status === 404) and call createLabel only in that case,
otherwise rethrow or surface the original error (or log and throw) so
permission/rate-limit/validation failures aren't masked; references:
github.rest.issues.updateLabel, github.rest.issues.createLabel, and the label
variable.
🪄 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: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro
Run ID: 8e45e154-fd81-4657-9503-0b853f5a6c4d
📒 Files selected for processing (1)
.github/workflows/sync-pr-labels.yml
Summary
Adds a new Step 0 to the existing
sync-pr-labelsworkflow that upsertscolored labels on every PR trigger.
Changes
Upsert colored labelsstep before existing label sync logicthe PR list page
updateLabelif label exists,createLabelif it doesn't —so it's safe to run on every PR event
Label Colors Added
documentation#0075caenhancement#a2eeeffrontend#7057ffjavascript#f0e040dependencies#e4e669configuration#f9d0c4good first issue#7cfc00first-time-contributor#ff9500no-issue-linked#d93f0bsize/XS → XLci-cd#00c0efType of Change
Checklist
Additional Notes:
Checklist
We encourage contributors to use AI tools responsibly when creating Pull Requests. While AI can be a valuable aid, it is essential to ensure that your contributions meet the task requirements, build successfully, include relevant tests, and pass all linters. Submissions that do not meet these standards may be closed without warning to maintain the quality and integrity of the project. Please take the time to understand the changes you are proposing and their impact.
Summary by CodeRabbit