From 5aea2846374f111cd74ec07a05b0ca32fc59a9d1 Mon Sep 17 00:00:00 2001 From: Luca Comellini Date: Wed, 31 May 2023 12:31:45 -0700 Subject: [PATCH] Update labeler config with new format (#697) https://github.com/actions/labeler/pull/203 was finally merged and actions/labeler created a pre-release with the changes. This updates the version of the action to use the official actions/labeler. It also updates labeler.yml with the new config format and adds missing change label. --- .github/labeler.yml | 20 +++++++++++--------- .github/workflows/labeler.yml | 8 ++++---- 2 files changed, 15 insertions(+), 13 deletions(-) diff --git a/.github/labeler.yml b/.github/labeler.yml index e60a0c846..1e2efee0c 100644 --- a/.github/labeler.yml +++ b/.github/labeler.yml @@ -1,20 +1,22 @@ +change: + - head-branch: ['^change/'] + enhancement: -- branch: ['feature/**', 'feat/**', 'enhancement/**', 'enh/**'] + - head-branch: ['^feature/', '^feat/', '^enhancement/', '^enh/'] bug: -- branch: ['fix/**', 'bug/**'] + - head-branch: ['^fix/', '^bug/'] chore: -- branch: ['chore/**'] + - head-branch: ['^chore/'] tech-debt: -- branch: ['tech-debt/**', 'techdebt/**', 'debt/**'] + - head-branch: ['^tech-debt/', '^techdebt/', '^debt/'] documentation: -- branch: ['docs/**', 'doc/**'] -- '**/*.md' + - head-branch: ['^docs/', '^doc/'] + - changed-files: '**/*.md' dependencies: -- branch: ['deps/**', 'dep/**', 'dependabot/**'] -- go.mod -- go.sum + - head-branch: ['^deps/', '^dep/', '^dependabot/'] + - changed-files: ['go.mod', 'go.sum'] diff --git a/.github/workflows/labeler.yml b/.github/workflows/labeler.yml index 608cd8333..3706a1737 100644 --- a/.github/workflows/labeler.yml +++ b/.github/workflows/labeler.yml @@ -2,7 +2,7 @@ name: "Pull Request Labeler" on: - pull_request_target -permissions: # added using https://github.com/step-security/secure-workflows +permissions: contents: read jobs: @@ -12,6 +12,6 @@ jobs: pull-requests: write runs-on: ubuntu-latest steps: - - uses: joshdales/labeler@7b1327b4c44a8794dfc7573d60637cd60ce4b697 # if https://github.com/actions/labeler/pull/203 is merged, use the official action actions/labeler - with: - repo-token: "${{ secrets.GITHUB_TOKEN }}" + - uses: actions/labeler@4f052778de9a9b80cb16cfb9079b02287285a4cb # v5.0.0-alpha.1 + with: + repo-token: "${{ secrets.GITHUB_TOKEN }}"