From 5309cf6555033ed07bf9b44942fb0188a7ea4e43 Mon Sep 17 00:00:00 2001 From: Bibo-Joshi <22366557+Bibo-Joshi@users.noreply.github.com> Date: Sat, 20 May 2023 10:27:51 +0200 Subject: [PATCH] Automatically Label `pre-commit-ci` PRs (#3713) --- .github/labeler.yml | 9 +++++++++ .github/workflows/labelling.yml | 17 +++++++++++++++++ 2 files changed, 26 insertions(+) create mode 100644 .github/labeler.yml create mode 100644 .github/workflows/labelling.yml diff --git a/.github/labeler.yml b/.github/labeler.yml new file mode 100644 index 000000000..dd8462d62 --- /dev/null +++ b/.github/labeler.yml @@ -0,0 +1,9 @@ +# Config file for workflows/labelling.yml + +version: 1 + +labels: +- label: "dependencies" + authors: ["dependabot", "pre-commit-ci"] +- label: "code quality ✨" + authors: ["pre-commit-ci"] diff --git a/.github/workflows/labelling.yml b/.github/workflows/labelling.yml new file mode 100644 index 000000000..4512d2e1f --- /dev/null +++ b/.github/workflows/labelling.yml @@ -0,0 +1,17 @@ +name: PR Labeler + +on: + pull_request: + types: [opened] + +jobs: + pre-commit-ci: + permissions: + contents: read # for srvaroa/labeler to read config file + pull-requests: write # for srvaroa/labeler to add labels in PR + runs-on: ubuntu-latest + steps: + - uses: srvaroa/labeler@v1.5.0 + # Config file at .github/labeler.yml + env: + GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"