Skip to content

chore: add product labels in CodeRabbit#12459

Merged
zkochan merged 1 commit into
mainfrom
coderabbit-product-labels
Jun 16, 2026
Merged

chore: add product labels in CodeRabbit#12459
zkochan merged 1 commit into
mainfrom
coderabbit-product-labels

Conversation

@zkochan

@zkochan zkochan commented Jun 16, 2026

Copy link
Copy Markdown
Member

Mirror the three product labels from the Qodo config (.pr_agent.toml) into CodeRabbit (.coderabbit.yaml):

  • product: pnpm — changes to the TypeScript pnpm CLI (anything outside pacquet/ and pnpr/)
  • product: pacquet — changes to pacquet, the Rust port (the pacquet/ directory)
  • product: pnpr — changes to pnpr, the registry server (the pnpr/ directory and pacquet/crates/pnpr-* crates)

CodeRabbit assigns these via reviews.labeling_instructions, and auto_apply_labels: true makes it actually attach the labels to the PR rather than only suggesting them in the walkthrough — the equivalent of Qodo's publish_labels.


Written by an agent (Claude Code, claude-opus-4-8).

Summary by CodeRabbit

  • Chores
    • Updated PR automation configuration to automatically apply product-specific labels based on affected components in pull requests, streamlining the labeling process for better organization and tracking.

Mirror the three product labels (product: pnpm, product: pacquet,
product: pnpr) from the Qodo config into CodeRabbit, auto-applied based
on which stack the diff touches. Enables auto_apply_labels so the
labels are attached to the PR rather than only suggested.
@qodo-free-for-open-source-projects

qodo-free-for-open-source-projects Bot commented Jun 16, 2026

Copy link
Copy Markdown

Code Review by Qodo

🐞 Bugs (1) 📘 Rule violations (0)

Grey Divider


Remediation recommended

1. Overbroad pnpm label 🐞 Bug ≡ Correctness
Description
The new "product: pnpm" instruction applies to any change outside pacquet/ and pnpr/, which includes
repo-level tooling/config changes (including .coderabbit.yaml itself), so enabling auto_apply_labels
will auto-attach an incorrect product label to non-CLI PRs.
Code

.coderabbit.yaml[R11-12]

+    - label: "product: pnpm"
+      instructions: "Apply when changes affect the TypeScript pnpm CLI (any code outside pacquet/ and pnpr/)."
Evidence
The configuration explicitly turns on automatic label application and defines "product: pnpm" as
applying to any changes outside pacquet/ and pnpr/, which includes root-level configuration files
such as .coderabbit.yaml—so config-only PRs will be labeled as pnpm.

.coderabbit.yaml[7-12]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
The `product: pnpm` rule is defined as “any code outside pacquet/ and pnpr/”, which unintentionally includes repo-level files (CI, docs, configs like `.coderabbit.yaml`). With `auto_apply_labels: true`, this will cause noisy/incorrect product labels on non-product PRs.

## Issue Context
This PR enables automatic label application and introduces product labeling rules.

## Fix Focus Areas
- .coderabbit.yaml[7-16]

## Suggested fix
Adjust the `product: pnpm` labeling instruction to target only actual pnpm CLI/source areas (e.g., explicit directories like `pnpm/`, `cli/`, `packages/`, `pkg-manager/`, etc.), or explicitly exclude repo-config-only changes if the schema supports include/exclude path patterns.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


Grey Divider

Qodo Logo

@coderabbitai

coderabbitai Bot commented Jun 16, 2026

Copy link
Copy Markdown

Review Change Stack

Caution

Review failed

The pull request is closed.

Warning

Ignoring CodeRabbit configuration file changes. For security, only the configuration from the base branch is applied for open source repositories.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 18952f05-ffff-4cc2-81ae-e9cd0b25c73c

📥 Commits

Reviewing files that changed from the base of the PR and between b1a28e0 and a572951.

📒 Files selected for processing (1)
  • .coderabbit.yaml

📝 Walkthrough

Walkthrough

.coderabbit.yaml gains auto_apply_labels: true and a labeling_instructions block that maps three product labels (product: pnpm, product: pacquet, product: pnpr) to specific subdirectory and crate paths, directing the labels to be applied to PRs rather than only suggested in walkthroughs.

Changes

PR Auto-Labeling Configuration

Layer / File(s) Summary
Auto-label rules for pnpm, pacquet, and pnpr
.coderabbit.yaml
Adds auto_apply_labels: true and labeling_instructions entries that map changed path patterns (including pnpr crate directories and pacquet pnpr-related crates) to three product-scoped labels applied directly to PRs.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

Poem

A rabbit hops through the code with glee,
Stamping labels for all the world to see!
pnpm here, pacquet there,
pnpr stickers fill the air —
No PR goes untagged, no path roams free! 🐇✨

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch coderabbit-product-labels

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.

@zkochan zkochan merged commit c9db42d into main Jun 16, 2026
18 of 19 checks passed
@zkochan zkochan deleted the coderabbit-product-labels branch June 16, 2026 21:55
@qodo-free-for-open-source-projects

Copy link
Copy Markdown

PR Summary by Qodo

Enable auto-applied product labels in CodeRabbit config
⚙️ Configuration changes 🕐 Less than 5 minutes

Grey Divider

Walkthroughs

Description
• Enable CodeRabbit to auto-apply labels directly to PRs.
• Add product-scoped labeling rules for pnpm, pacquet, and pnpr diffs.
• Mirror existing product-label semantics from the Qodo configuration.
Diagram
graph TD
  A["PR diff"] --> B["CodeRabbit reviews"] --> C["Labeling rules"] --> D[("GitHub PR labels")]
  B --> E["Review guidance"]
Loading
High-Level Assessment

The following are alternative approaches to this PR:

1. Use GitHub Actions labeler (e.g., actions/labeler)
  • ➕ Decouples labeling from CodeRabbit; works even when CodeRabbit is disabled
  • ➕ More expressive path-based rules in a dedicated labeling tool
  • ➖ Adds CI/workflow maintenance overhead
  • ➖ Duplicates logic across bots if CodeRabbit should also reason about labels
2. Single source of truth + generate bot configs
  • ➕ Avoids drift between .pr_agent.toml and .coderabbit.yaml
  • ➕ Easier to evolve label taxonomy once
  • ➖ Requires a generator script and build/validation process
  • ➖ Adds complexity for a small set of rules

Recommendation: The PR’s approach is the best fit if CodeRabbit is the desired labeling authority: it keeps the rules close to the CodeRabbit integration and makes labels actually attach via auto_apply_labels. Consider a generator only if label rules expand materially or drift becomes a recurring problem.

Grey Divider

File Changes

Other (1)
.coderabbit.yaml Auto-apply product labels via CodeRabbit labeling instructions +10/-0

Auto-apply product labels via CodeRabbit labeling instructions

• Enables auto_apply_labels so CodeRabbit attaches labels to PRs. Adds three product labeling rules (pnpm, pacquet, pnpr) keyed to which areas of the repository a diff touches.

.coderabbit.yaml


Grey Divider

Qodo Logo

Comment thread .coderabbit.yaml
Comment on lines +11 to +12
- label: "product: pnpm"
instructions: "Apply when changes affect the TypeScript pnpm CLI (any code outside pacquet/ and pnpr/)."

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Remediation recommended

1. Overbroad pnpm label 🐞 Bug ≡ Correctness

The new "product: pnpm" instruction applies to any change outside pacquet/ and pnpr/, which includes
repo-level tooling/config changes (including .coderabbit.yaml itself), so enabling auto_apply_labels
will auto-attach an incorrect product label to non-CLI PRs.
Agent Prompt
## Issue description
The `product: pnpm` rule is defined as “any code outside pacquet/ and pnpr/”, which unintentionally includes repo-level files (CI, docs, configs like `.coderabbit.yaml`). With `auto_apply_labels: true`, this will cause noisy/incorrect product labels on non-product PRs.

## Issue Context
This PR enables automatic label application and introduces product labeling rules.

## Fix Focus Areas
- .coderabbit.yaml[7-16]

## Suggested fix
Adjust the `product: pnpm` labeling instruction to target only actual pnpm CLI/source areas (e.g., explicit directories like `pnpm/`, `cli/`, `packages/`, `pkg-manager/`, etc.), or explicitly exclude repo-config-only changes if the schema supports include/exclude path patterns.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant