Skip to content

Refactor PR labeler configuration and upgrade to v5#1409

Merged
TinyKitten merged 1 commit into
devfrom
claude/add-pr-labeler-R8vwN
Mar 5, 2026
Merged

Refactor PR labeler configuration and upgrade to v5#1409
TinyKitten merged 1 commit into
devfrom
claude/add-pr-labeler-R8vwN

Conversation

@TinyKitten

@TinyKitten TinyKitten commented Mar 5, 2026

Copy link
Copy Markdown
Member

Summary

Updated the PR labeler workflow to use the latest version of the labeler action and restructured the labeling configuration to separate file-based and branch-based labeling strategies. #1377

Key Changes

  • Upgraded actions/labeler from v4 to v5 in the PR labeler workflow
  • Refactored .github/labeler.yml to use the new changed-files syntax with any-glob-to-any-file matchers, which is required by labeler v5
  • Removed branch-based labels (deploy-prod, deploy-staging, deploy-dev) from the file-based labeler configuration
  • Added new workflow job label-by-branch using TimonVS/pr-labeler-action@v5 to handle branch-based labeling separately
  • Created .github/pr-labeler.yml with:
    • Head branch (source) patterns for feature, fix, chore, data, and release branches
    • Base branch (target) patterns for deployment labels (production, dev, staging)

Implementation Details

The labeling logic is now split into two independent jobs:

  1. label-by-files: Uses the official GitHub labeler action to apply labels based on changed files
  2. label-by-branch: Uses a community action to apply labels based on branch naming conventions

This separation provides better maintainability and allows for independent scaling of each labeling strategy.

https://claude.ai/code/session_011JibAfjh65ao3VdZFJhXka

Summary by CodeRabbit

リリースノート

  • Chores
    • プルリクエストの自動ラベリングシステムを改善しました。新しいブランチパターン(data/、release/、chore/*)に対応し、デプロイメント対象ブランチ(production、dev、staging)に基づくラベル付けが可能になりました。

- actions/labeler を v4 → v5 に更新し、labeler.yml を v5 形式に移行
- TimonVS/pr-labeler-action@v5 を追加してブランチパターンによるラベル付与を実装
- ヘッドブランチ (feature/*, fix/*, data/*, release/* 等) に基づくラベル付与
- ベースブランチ (master, dev, staging) に基づく deploy:production / deploy:dev / deploy:staging ラベル付与
- labeler.yml からブランチ記法 (deploy-prod, deploy-staging, deploy-dev) を除去

https://claude.ai/code/session_011JibAfjh65ao3VdZFJhXka
@github-actions github-actions Bot added the ci/cd label Mar 5, 2026
@coderabbitai

coderabbitai Bot commented Mar 5, 2026

Copy link
Copy Markdown
Contributor
📝 Walkthrough

Walkthrough

GitHubのPRラベリングワークフローを強化するため、ラベラー設定ファイルを再構成し、新しい分岐パターンを追加し、アクションバージョンをv4からv5にアップグレードしました。

Changes

Cohort / File(s) Summary
ラベラー設定の構造化
.github/labeler.yml
グロブパターンをフラットリストからネストされたchanged-files構造(any-glob-to-any-file)に再構成。ci/cd、rust、protobuf、documentation、dataセクションを更新。
PRラベラー設定の拡張
.github/pr-labeler.yml
新しいhead-branchパターン(data/*、release/*、chore/*)と、base-branchマッピング(deploy:production → master、deploy:dev → dev、deploy:staging → staging)を追加。
ワークフロー定義の更新
.github/workflows/pr_labeler.yml
既存ジョブをtriageからlabel-by-filesに改名、actions/labelerをv4からv5にアップグレード。新しいlabel-by-branchジョブ(TimonVS/pr-labeler-action@v5)を追加。

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Suggested labels

ci/cd

Poem

🐰 ラベルを整えて、ファイルも分岐も
新しい構造でスッキリ再編
v5へアップデート、ワークフロー躍進
PRの整理整頓、完璧さ求めて🏷️

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately reflects the main changes: refactoring the PR labeler configuration and upgrading the action from v4 to v5.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
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 docstrings (stacked PR)
  • 📝 Generate docstrings (commit on current branch)
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch claude/add-pr-labeler-R8vwN

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

@TinyKitten TinyKitten self-assigned this Mar 5, 2026
@TinyKitten TinyKitten merged commit fad371d into dev Mar 5, 2026
2 checks passed
@TinyKitten TinyKitten deleted the claude/add-pr-labeler-R8vwN branch March 5, 2026 12:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants