diff --git a/.github/labeler.yml b/.github/labeler.yml new file mode 100644 index 00000000000..83332f7b8f5 --- /dev/null +++ b/.github/labeler.yml @@ -0,0 +1,7 @@ +# Add 'skip news' label for any changes created by pre-commit ci. +# If https://github.com/actions/labeler/pull/563 is merged, we can check author pre-commit-ci. +'skip news': +- changed-files: + - any-glob-to-any-file: .pre-commit-config.yaml + - base-branch: ['main'] + - head-branch: ['pre-commit-ci-update-config'] diff --git a/.github/workflows/labeler.yml b/.github/workflows/labeler.yml new file mode 100644 index 00000000000..e57cd86e2b3 --- /dev/null +++ b/.github/workflows/labeler.yml @@ -0,0 +1,12 @@ +name: "Pull Request Labeler" +on: +- pull_request_target + +jobs: + labeler: + permissions: + contents: read + pull-requests: write + runs-on: ubuntu-latest + steps: + - uses: actions/labeler@v5 diff --git a/news/12605.trivial.rst b/news/12605.trivial.rst new file mode 100644 index 00000000000..d629053e577 --- /dev/null +++ b/news/12605.trivial.rst @@ -0,0 +1 @@ +Automatically add ``skip news`` label to the pull request created by pre-commit ci.