From 4d7365018c0579e43e4e5329d762a319608d087b Mon Sep 17 00:00:00 2001 From: Shaun Thompson Date: Tue, 18 Jun 2024 09:06:41 -0400 Subject: [PATCH] ci: add pr-labeler Signed-off-by: Shaun Thompson --- .github/labeler.yml | 104 ++++++++++++++++++++++++++++++++++ .github/workflows/labeler.yml | 19 +++++++ 2 files changed, 123 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..e4997f2a --- /dev/null +++ b/.github/labeler.yml @@ -0,0 +1,104 @@ + +# Add 'area/project' label to changes in basic project documentation and .github folder, excluding .github/workflows +area/project: +- all: + - changed-files: + - any-glob-to-any-file: + - .github/** + - LICENSE + - AUTHORS + - MAINTAINERS + - PROJECT.md + - README.md + - .gitignore + - codecov.yml + - all-globs-to-all-files: '!.github/workflows/*' + +# Add 'area/github-actions' label to changes in the .github/workflows folder +area/ci: + - changed-files: + - any-glob-to-any-file: '.github/workflows/**' + +# Add 'area/bake' label to changes in the bake +area/bake: + - changed-files: + - any-glob-to-any-file: 'bake/**' + +# Add 'area/bake/compose' label to changes in the bake+compose +area/bake/compose: + - changed-files: + - any-glob-to-any-file: + - bake/compose.go + - bake/compose_test.go + +# Add 'area/build' label to changes in build files +area/build: + - changed-files: + - any-glob-to-any-file: 'build/**' + +# Add 'area/builder' label to changes in builder files +area/builder: + - changed-files: + - any-glob-to-any-file: 'builder/**' + +# Add 'area/cli' label to changes in the CLI +area/cli: + - changed-files: + - any-glob-to-any-file: + - cmd/** + - commands/** + +# Add 'area/controller' label to changes in the controller +area/controller: + - changed-files: + - any-glob-to-any-file: 'controller/**' + +# Add 'area/docs' label to markdown files in the docs folder +area/docs: + - changed-files: + - any-glob-to-any-file: 'docs/**/*.md' + +# Add 'area/dependencies' label to changes in go dependency files +area/dependencies: + - changed-files: + - any-glob-to-any-file: + - go.mod + - go.sum + - vendor/** + +# Add 'area/driver' label to changes in the driver folder +area/driver: + - changed-files: + - any-glob-to-any-file: 'driver/**' + +# Add 'area/driver/docker' label to changes in the docker driver +area/driver/docker: + - changed-files: + - any-glob-to-any-file: 'driver/docker/**' + +# Add 'area/driver/docker-container' label to changes in the docker-container driver +area/driver/docker-container: + - changed-files: + - any-glob-to-any-file: 'driver/docker-container/**' + +# Add 'area/driver/kubernetes' label to changes in the kubernetes driver +area/driver/kubernetes: + - changed-files: + - any-glob-to-any-file: 'driver/kubernetes/**' + +# Add 'area/driver/remote' label to changes in the remote driver +area/driver/remote: + - changed-files: + - any-glob-to-any-file: 'driver/remote/**' + +# Add 'area/hack' label to changes in the hack folder +area/hack: + - changed-files: + - any-glob-to-any-file: 'hack/**' + +# Add 'area/tests' label to changes in test files +area/tests: + - changed-files: + - any-glob-to-any-file: + - tests/** + - '**/*_test.go' diff --git a/.github/workflows/labeler.yml b/.github/workflows/labeler.yml new file mode 100644 index 00000000..53700b0a --- /dev/null +++ b/.github/workflows/labeler.yml @@ -0,0 +1,19 @@ +name: labeler + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +on: + pull_request_target: + +jobs: + labeler: + permissions: + contents: read + pull-requests: write + runs-on: ubuntu-latest + steps: + - + name: Run + uses: actions/labeler@v5