From 47eb2a7e5088a73c793aa07b41dbfa52e6b029f8 Mon Sep 17 00:00:00 2001 From: Luca Comellini Date: Wed, 7 Sep 2022 20:03:56 -0700 Subject: [PATCH] Add PR labeler Automatically adds labels to PRs based on the rules in `.github/labeler.yml` --- .github/labeler.yml | 17 +++++++++++++++++ .github/workflows/labeler.yml | 14 ++++++++++++++ 2 files changed, 31 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 0000000000..c8641fe150 --- /dev/null +++ b/.github/labeler.yml @@ -0,0 +1,17 @@ +enhancement: +- branch: ['feature/**', 'feat/**', 'enhancement/**', 'enh/**'] + +bug: +- branch: ['fix/**', 'bug/**'] + +chore: +- branch: ['chore/**'] + +documentation: +- branch: ['docs/**', 'doc/**'] +- '**/*.md' + +dependencies: +- branch: ['deps/**', 'dep/**', 'dependabot/**'] +- go.mod +- go.sum diff --git a/.github/workflows/labeler.yml b/.github/workflows/labeler.yml new file mode 100644 index 0000000000..0fe603bd50 --- /dev/null +++ b/.github/workflows/labeler.yml @@ -0,0 +1,14 @@ +name: "Pull Request Labeler" +on: + - pull_request_target + +jobs: + triage: + permissions: + contents: read + pull-requests: write + runs-on: ubuntu-latest + steps: + - uses: joshdales/labeler@0861fa5accbc36878f85f40b98a9f40b15fe0429 # if https://github.com/actions/labeler/pull/203 is merged, use the official action actions/labeler + with: + repo-token: "${{ secrets.GITHUB_TOKEN }}"