From 13bedaf282132f716a3ba8a0f35ffe36f1fd1046 Mon Sep 17 00:00:00 2001 From: Cedric Lamoriniere Date: Tue, 20 Feb 2024 10:05:13 +0100 Subject: [PATCH] Add labeler github action --- .github/workflows/labeler/labels.yaml | 45 +++++++++++++++++++++++++++ .github/workflows/pr-labeler.yaml | 16 ++++++++++ 2 files changed, 61 insertions(+) create mode 100644 .github/workflows/labeler/labels.yaml create mode 100644 .github/workflows/pr-labeler.yaml diff --git a/.github/workflows/labeler/labels.yaml b/.github/workflows/labeler/labels.yaml new file mode 100644 index 000000000..e520ab3d1 --- /dev/null +++ b/.github/workflows/labeler/labels.yaml @@ -0,0 +1,45 @@ +chart/datadog: + - changed-files: + - any-glob-to-any-file: "charts/datadog/**" + +chart/datadog-crds: + - changed-files: + - any-glob-to-any-file: "charts/datadog-crds/**" + - any-glob-to-any-file: "crds/**" + +chart/datadog-operator: + - changed-files: + - any-glob-to-any-file: "charts/datadog-operator/**" + +chart/extended-daemon-set: + - changed-files: + - any-glob-to-any-file: "charts/extended-daemon-set/**" + +chart/watermarkpodautoscaler: + - changed-files: + - any-glob-to-any-file: "charts/watermarkpodautoscaler/**" + +chart/observability-pipelines-worker: + - changed-files: + - any-glob-to-any-file: "charts/observability-pipelines-worker/**" + +chart/synthetics-private-location: + - changed-files: + - any-glob-to-any-file: "charts/synthetics-private-location/**" + +tools/tests: + - changed-files: + - any-glob-to-any-file: "tests/**" + +tools/ci: + - changed-files: + - any-glob-to-any-file: ".github/**" + - any-glob-to-any-file: ".gitlab-ci.yml" + - any-glob-to-any-file: "Makefile" + +documentation: + - changed-files: + - any-glob-to-any-file: "README.md" + - any-glob-to-any-file: "examples/**" + - any-glob-to-any-file: "CONTRIBUTING.md" + - any-glob-to-any-file: "LICENSE" diff --git a/.github/workflows/pr-labeler.yaml b/.github/workflows/pr-labeler.yaml new file mode 100644 index 000000000..f1d36ed3d --- /dev/null +++ b/.github/workflows/pr-labeler.yaml @@ -0,0 +1,16 @@ +name: Labeler +on: + pull_request: + branches: + - main + +jobs: + label: + name: Add label for PRs + runs-on: ubuntu-latest + timeout-minutes: 5 + steps: + - uses: actions/labeler@v5 + with: + repo-token: "${{ secrets.GITHUB_TOKEN }}" + configuration-path: .github/workflows/labeler/labels.yaml