Created
January 25, 2024 11:45
-
-
Save yaakaito/3ae50f9e8952f97ef8fcab4f6b74481b to your computer and use it in GitHub Desktop.
labeler で変更されたファイルに合わせて PR にラベルを付ける
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
actions/labeler で設定できる。 | |
- https://github.com/actions/labeler | |
workflow と設定ファイルである `.github/labeler.yml` を作成する。 | |
基本は `changed-files` を利用して変更されたファイルをに対応したラベルをつけるようにする。`any` や `all` を使うことでもう少し複雑な条件を作れる。 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
frontend: | |
- changed-files: | |
- any-glob-to-any-file: 'frontend/**/*' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: "Pull Request Labeler" | |
on: | |
- pull_request | |
jobs: | |
labeler: | |
permissions: | |
contents: read | |
pull-requests: write | |
runs-on: ubuntu-latest | |
steps: | |
- id: label-the-PR | |
uses: actions/labeler@v5 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment