Skip to content

fix(ci): Improve Claude issue triage to preserve existing labels#1043

Merged
yamadashy merged 1 commit intomainfrom
fix/claude-issue-triage-preserve-labels
Dec 30, 2025
Merged

fix(ci): Improve Claude issue triage to preserve existing labels#1043
yamadashy merged 1 commit intomainfrom
fix/claude-issue-triage-preserve-labels

Conversation

@yamadashy
Copy link
Copy Markdown
Owner

Improve the Claude issue triage workflow to better handle existing labels:

  • Add instruction to check if the issue already has labels applied and avoid duplicates
  • Add explicit instruction to not remove existing labels

Checklist

  • Run npm run test
  • Run npm run lint

(No code changes, only workflow prompt updates)

Add instructions to check for existing labels before adding new ones
and explicitly prohibit removing existing labels.
@gemini-code-assist
Copy link
Copy Markdown
Contributor

Note

Gemini is unable to generate a summary for this pull request due to the file types involved not being currently supported.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Dec 30, 2025

📝 Walkthrough

Walkthrough

The Claude issue-triage GitHub Actions workflow is updated to explicitly fetch and validate the current issue labels before applying new labels, ensuring existing labels are preserved and preventing duplicate or conflicting label assignments.

Changes

Cohort / File(s)
GitHub Actions Workflow Configuration
.github/workflows/claude-issue-triage.yml
Added step to fetch and verify issue's current labels before label operations; added instruction to preserve existing labels when applying new ones

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Possibly related PRs

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and specifically summarizes the main change: improving the Claude issue triage workflow to preserve existing labels.
Description check ✅ Passed The description covers the main changes, includes both required checklist items marked complete, and explains that only workflow prompts were updated with no code changes.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fix/claude-issue-triage-preserve-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.

@claude
Copy link
Copy Markdown
Contributor

claude bot commented Dec 30, 2025

PR Review: fix(ci): Improve Claude issue triage to preserve existing labels

Overall Assessment: ✅ Approve

This is a clean, well-scoped PR that addresses a practical issue with the Claude issue triage workflow.

Summary

The changes add two instructional lines to the workflow prompt:

  1. Instructs Claude to check for existing labels and avoid duplicates/conflicts
  2. Explicitly states not to remove existing labels

Feedback

Strengths:

  • The changes are minimal and focused on a single concern
  • The instructions are clear and placed in logical locations within the prompt
  • Using --add-label (which is already in the workflow) inherently does not remove labels, but the explicit instruction reinforces this behavior and makes intent clear
Minor Suggestions (Non-blocking)
  1. Consider specifying how to check for existing labels: The instruction "Check if the issue already has any labels applied" is good, but you could make it more explicit by combining it with the issue view command:

    - Use `gh issue view ...` to retrieve the current issue details (including any existing labels)
    
  2. Edge case consideration: If an issue is created and quickly labeled by a human maintainer before this workflow runs, these new instructions ensure those manual labels are preserved. This is good defensive behavior.

Premortem Analysis

Potential Risk Likelihood Impact Mitigation
Claude misinterprets "conflicting labels" Low Low The context is clear enough; Claude can reason about label semantics
Workflow still adds duplicate labels Very Low Very Low The --add-label flag and these instructions should prevent this
Prompt changes do not affect behavior Low Low Can verify in next triggered issue

Checklist

  • Changes align with project workflow patterns
  • No security concerns (prompt-only changes)
  • No breaking changes
  • Clear and actionable instructions

Verdict: This is a good preventive fix. The changes are sensible and low-risk. Approved!


Reviewed by Claude

@codecov
Copy link
Copy Markdown

codecov bot commented Dec 30, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 90.34%. Comparing base (3d791b0) to head (bc900d7).
⚠️ Report is 2 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1043   +/-   ##
=======================================
  Coverage   90.34%   90.34%           
=======================================
  Files         123      123           
  Lines        9457     9457           
  Branches     1709     1709           
=======================================
  Hits         8544     8544           
  Misses        913      913           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@cloudflare-workers-and-pages
Copy link
Copy Markdown

Deploying repomix with  Cloudflare Pages  Cloudflare Pages

Latest commit: bc900d7
Status: ✅  Deploy successful!
Preview URL: https://7fb15ea6.repomix.pages.dev
Branch Preview URL: https://fix-claude-issue-triage-pres.repomix.pages.dev

View logs

Copy link
Copy Markdown
Contributor

@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: 0

🧹 Nitpick comments (1)
.github/workflows/claude-issue-triage.yml (1)

47-47: Consider clarifying "conflicting labels".

The instruction to "avoid adding duplicate or conflicting labels" is good, but "conflicting labels" is somewhat ambiguous. Consider providing examples or clearer criteria for what constitutes a conflict (e.g., should "bug" and "enhancement" be considered conflicting?). This would help Claude make more consistent decisions.

🔎 Suggested clarification
-               - Check if the issue already has any labels applied and avoid adding duplicate or conflicting labels
+               - Check if the issue already has any labels applied and avoid adding duplicate labels (labels that are already present)

Or if you want to maintain the "conflicting" concept, provide examples:

-               - Check if the issue already has any labels applied and avoid adding duplicate or conflicting labels
+               - Check if the issue already has any labels applied and avoid adding duplicate labels (e.g., don't add "bug" if it already exists, and don't add mutually exclusive category labels)
📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 3d791b0 and bc900d7.

📒 Files selected for processing (1)
  • .github/workflows/claude-issue-triage.yml
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (10)
  • GitHub Check: Build and run (windows-latest, 20.x)
  • GitHub Check: Build and run (windows-latest, 25.x)
  • GitHub Check: Test (windows-latest, 24.x)
  • GitHub Check: Test with Bun (windows-latest, latest)
  • GitHub Check: Test (windows-latest, 22.x)
  • GitHub Check: Test with Bun (macos-latest, latest)
  • GitHub Check: Test (windows-latest, 25.x)
  • GitHub Check: Build and run (macos-latest, 25.x)
  • GitHub Check: Test (windows-latest, 20.x)
  • GitHub Check: Cloudflare Pages
🔇 Additional comments (1)
.github/workflows/claude-issue-triage.yml (1)

72-72: Good safeguard to preserve existing labels.

This instruction explicitly prevents Claude from removing existing labels, which aligns well with the PR objectives. The --add-label flag on line 71 appends labels by default without removing existing ones, so this instruction serves as an additional safeguard.

@yamadashy yamadashy merged commit 4497ff1 into main Dec 30, 2025
56 checks passed
@yamadashy yamadashy deleted the fix/claude-issue-triage-preserve-labels branch December 30, 2025 09:38
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