PR 自動ラベリング設定
Pull Request に変更内容に応じて自動的にラベルを付与する設定を管理します。
手動でのラベル付与は不要 - PR 作成時に GitHub Actions で自動付与されます。
実行手順
- •ユーザーから追加したいラベルルールをヒアリング
- •
.github/labeler.ymlを確認・更新 - •変更をコミット・プッシュ
ラベリングルール
アプリケーション
| ラベル | 対象ファイル |
|---|---|
backend | apps/backend/** |
frontend | apps/frontend/** |
カテゴリ
| ラベル | 対象ファイル |
|---|---|
infra | .github/**, docker-compose.yml |
docs | **/*.md, docs/** |
tests | **/tests/**, **/*.test.{ts,tsx,py} |
dependencies | package.json, pyproject.toml |
技術スタック
| ラベル | 対象ファイル |
|---|---|
typescript | **/*.{ts,tsx} |
python | **/*.py |
設定ファイル
.github/labeler.yml:
yaml
backend:
- changed-files:
- any-glob-to-any-file: 'apps/backend/**'
frontend:
- changed-files:
- any-glob-to-any-file: 'apps/frontend/**'
カスタマイズ
bash
# 新しいラベル作成
gh label create "ai" --color "FF6B6B" --description "AI/LLM related"
# labeler.yml にルール追加
cat >> .github/labeler.yml <<EOF
ai:
- changed-files:
- any-glob-to-any-file: 'apps/backend/src/services/llm.py'
EOF