From 04006e093ee9ce2edd8da6ea095458cb9b71e104 Mon Sep 17 00:00:00 2001 From: Michael Osthege Date: Thu, 13 Oct 2022 11:17:06 +0200 Subject: [PATCH] Automatically label PRs based on modified files Closes #6139 --- .github/labeler.yml | 8 ++++++++ .github/workflows/autoupdate-pre-commit-config.yml | 2 ++ .github/workflows/labeler.yml | 14 ++++++++++++++ 3 files changed, 24 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 00000000000..8fa75ec4886 --- /dev/null +++ b/.github/labeler.yml @@ -0,0 +1,8 @@ +# Add 'maintenance` label to any change to *.yml files +maintenance: +- any: ['**.yml', ''] + +# Add "no releasenotes" label if only the pre-commit config changed +no releasenotes: +- any: [] + all: ['.pre-commit-config.yml'] diff --git a/.github/workflows/autoupdate-pre-commit-config.yml b/.github/workflows/autoupdate-pre-commit-config.yml index a4c6b70fe24..df2660a2c34 100644 --- a/.github/workflows/autoupdate-pre-commit-config.yml +++ b/.github/workflows/autoupdate-pre-commit-config.yml @@ -29,5 +29,7 @@ jobs: pre-commit autoupdate || (exit 0); pre-commit run -a || (exit 0); COMMIT_MESSAGE: "⬆️ UPGRADE: Autoupdate pre-commit config" + COMMIT_NAME: "pymc-bot" + COMMIT_EMAIL: "pymc-devs@users.noreply.github.com" PR_BRANCH_NAME: "pre-commit-config-update-${PR_ID}" PR_TITLE: "⬆️ UPGRADE: Autoupdate pre-commit config" diff --git a/.github/workflows/labeler.yml b/.github/workflows/labeler.yml new file mode 100644 index 00000000000..057208eda32 --- /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: actions/labeler@v4 + with: + repo-token: "${{ secrets.GITHUB_TOKEN }}"