Skip to content

feat: add colorful label colors to sync-pr-labels workflow#57

Open
Aarya-Chaudhari wants to merge 2 commits intoAOSSIE-Org:mainfrom
Aarya-Chaudhari:colors
Open

feat: add colorful label colors to sync-pr-labels workflow#57
Aarya-Chaudhari wants to merge 2 commits intoAOSSIE-Org:mainfrom
Aarya-Chaudhari:colors

Conversation

@Aarya-Chaudhari
Copy link
Copy Markdown

@Aarya-Chaudhari Aarya-Chaudhari commented Apr 15, 2026

Summary

Adds a new Step 0 to the existing sync-pr-labels workflow that upserts
colored labels on every PR trigger.

Changes

  • Added Upsert colored labels step before existing label sync logic
  • Each label now has a distinct color for better visual differentiation on
    the PR list page
  • Uses updateLabel if label exists, createLabel if it doesn't —
    so it's safe to run on every PR event

Label Colors Added

Label Color
documentation 🔵 Blue #0075ca
enhancement 🩵 Cyan #a2eeef
frontend 🟣 Purple #7057ff
javascript 🟡 Yellow #f0e040
dependencies 🟢 Lime #e4e669
configuration 🍑 Peach #f9d0c4
good first issue 💚 Green #7cfc00
first-time-contributor 🟠 Orange #ff9500
no-issue-linked 🔴 Red #d93f0b
size/XS → XL gradient green → red
ci-cd 🩵 Teal #00c0ef

Type of Change

  • Enhancement (non-breaking improvement to existing feature)

Checklist

  • I have tested this workflow logic
  • No existing steps were modified
  • Documentation updated if needed

Additional Notes:

Checklist

  • My code follows the project's code style and conventions
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings or errors
  • I have joined the Discord server and I will share a link to this PR with the project maintainers there
  • I have read the Contributing Guidelines

⚠️ AI Notice - Important!

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

  • Chores
    • Improved GitHub Actions workflow automation to ensure consistent label configuration across pull requests.

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Apr 15, 2026

Warning

Rate limit exceeded

@Aarya-Chaudhari has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 53 minutes and 54 seconds before requesting another review.

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 @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

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 configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: 137dd809-c154-4335-8a6f-81697fb26e6d

📥 Commits

Reviewing files that changed from the base of the PR and between 72c9147 and 188a427.

📒 Files selected for processing (1)
  • .github/workflows/sync-pr-labels.yml

Walkthrough

A 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

Cohort / File(s) Summary
Label Synchronization Workflow
.github/workflows/sync-pr-labels.yml
Added initialization step that iterates over predefined labels and upserts them (attempts update, falls back to create). Removed inline comments and unnecessary whitespace for code cleanup. No functional changes to label detection or application logic.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

🐰 With whiskers twitched and nose held high,
I've added labels to the sky,
Upsert this, create that with care,
Clean comments now, no clutter there!

🚥 Pre-merge checks | ✅ 2
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title directly describes the main change: adding colorful label colors to the sync-pr-labels workflow, which matches the PR's core objective of assigning distinct colors to labels for visual differentiation.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions github-actions bot added size/M and removed size/M labels Apr 15, 2026
Copy link
Copy Markdown

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

📥 Commits

Reviewing files that changed from the base of the PR and between cc79e19 and 72c9147.

📒 Files selected for processing (1)
  • .github/workflows/sync-pr-labels.yml

Comment thread .github/workflows/sync-pr-labels.yml
@github-actions github-actions bot added size/M and removed size/M labels Apr 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant