From 234351add9d9afd1e59688c51ee6af5548fe5709 Mon Sep 17 00:00:00 2001 From: Claude Date: Thu, 5 Mar 2026 11:58:26 +0000 Subject: [PATCH] =?UTF-8?q?ci:=20=E3=83=96=E3=83=A9=E3=83=B3=E3=83=81?= =?UTF-8?q?=E3=83=99=E3=83=BC=E3=82=B9=E3=81=AEPR=E3=83=A9=E3=83=99?= =?UTF-8?q?=E3=83=A9=E3=83=BC=E3=82=92=E5=B0=8E=E5=85=A5=E3=81=97=E3=80=81?= =?UTF-8?q?labeler=E3=82=92v5=E3=81=AB=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 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/labeler.yml | 34 ++++++++++++++++++-------------- .github/pr-labeler.yml | 10 +++++++++- .github/workflows/pr_labeler.yml | 17 ++++++++++++++-- 3 files changed, 43 insertions(+), 18 deletions(-) diff --git a/.github/labeler.yml b/.github/labeler.yml index de284cfe..00db028f 100644 --- a/.github/labeler.yml +++ b/.github/labeler.yml @@ -1,20 +1,24 @@ ci/cd: - - ".github/workflows/*" - - ".github/*.yml" + - changed-files: + - any-glob-to-any-file: + - ".github/workflows/*" + - ".github/*.yml" rust: - - "src/*" - - "src/**/*" + - changed-files: + - any-glob-to-any-file: + - "src/*" + - "src/**/*" protobuf: - - "proto/*" - - "proto/**/*" -deploy-prod: - - "master" -deploy-staging: - - "staging" -deploy-dev: - - "dev" + - changed-files: + - any-glob-to-any-file: + - "proto/*" + - "proto/**/*" documentation: - - ".github/ISSUE_TEMPLATE/*" - - "pull_request_template.md" + - changed-files: + - any-glob-to-any-file: + - ".github/ISSUE_TEMPLATE/*" + - "pull_request_template.md" data: - - "*.csv" + - changed-files: + - any-glob-to-any-file: + - "*.csv" diff --git a/.github/pr-labeler.yml b/.github/pr-labeler.yml index f096fb65..3088fd32 100644 --- a/.github/pr-labeler.yml +++ b/.github/pr-labeler.yml @@ -1,3 +1,11 @@ +# Head branch (source) patterns feature: feature/* fix: fix/* -chore: chore/* \ No newline at end of file +chore: chore/* +data: data/* +release: release/* + +# Base branch (target) patterns +deploy:production: master +deploy:dev: dev +deploy:staging: staging diff --git a/.github/workflows/pr_labeler.yml b/.github/workflows/pr_labeler.yml index 356bbb91..e92890f4 100644 --- a/.github/workflows/pr_labeler.yml +++ b/.github/workflows/pr_labeler.yml @@ -3,12 +3,25 @@ on: - pull_request_target jobs: - triage: + label-by-files: + name: Label by changed files permissions: contents: read pull-requests: write runs-on: ubuntu-latest steps: - - uses: actions/labeler@v4 + - uses: actions/labeler@v5 with: repo-token: "${{ secrets.GITHUB_TOKEN }}" + + label-by-branch: + name: Label by branch + permissions: + contents: read + pull-requests: write + runs-on: ubuntu-latest + steps: + - uses: TimonVS/pr-labeler-action@v5 + with: + repo-token: "${{ secrets.GITHUB_TOKEN }}" + configuration-path: .github/pr-labeler.yml