From ff6a3bbee035678260f7fcbd0c297730f45d7b0c Mon Sep 17 00:00:00 2001 From: Junegunn Choi Date: Tue, 24 Feb 2026 20:27:29 +0900 Subject: [PATCH] Add GitHub action for labelling PRs --- .github/labeler.yml | 64 +++++++++++++++++++++++++++++++++++ .github/workflows/labeler.yml | 17 ++++++++++ 2 files changed, 81 insertions(+) create mode 100644 .github/labeler.yml create mode 100644 .github/workflows/labeler.yml diff --git a/.github/labeler.yml b/.github/labeler.yml new file mode 100644 index 00000000..a4b14dba --- /dev/null +++ b/.github/labeler.yml @@ -0,0 +1,64 @@ +go: + - changed-files: + - any-glob-to-any-file: + - src/** + - main.go + - go.mod + - go.sum + +shell: + - changed-files: + - any-glob-to-any-file: + - shell/** + +bash: + - changed-files: + - any-glob-to-any-file: + - shell/**/*.bash + +zsh: + - changed-files: + - any-glob-to-any-file: + - shell/**/*.zsh + +fish: + - changed-files: + - any-glob-to-any-file: + - shell/**/*.fish + +vim: + - changed-files: + - any-glob-to-any-file: + - plugin/** + +docs: + - changed-files: + - any-glob-to-any-file: + - '*.md' + - doc/** + - man/** + +ci: + - changed-files: + - any-glob-to-any-file: + - .github/** + +build: + - changed-files: + - any-glob-to-any-file: + - Makefile + - .goreleaser.yml + - Dockerfile + +test: + - changed-files: + - any-glob-to-any-file: + - test/** + - src/**/*_test.go + +install: + - changed-files: + - any-glob-to-any-file: + - install + - install.ps1 + - uninstall diff --git a/.github/workflows/labeler.yml b/.github/workflows/labeler.yml new file mode 100644 index 00000000..709a79ab --- /dev/null +++ b/.github/workflows/labeler.yml @@ -0,0 +1,17 @@ +name: Label PRs + +on: + pull_request_target: + types: [opened, synchronize, reopened] + +permissions: + contents: read + pull-requests: write + +jobs: + label: + runs-on: ubuntu-latest + steps: + - uses: actions/labeler@v5 + with: + configuration-path: .github/labeler.yml