From e96227a2b4b9bc986cc55ab94d8d43fad9fa7b5f Mon Sep 17 00:00:00 2001 From: Sebastian Kunze Date: Tue, 22 Nov 2022 15:27:51 +0100 Subject: [PATCH] Use `actions/labeler` to automatically label pull requests --- .github/labeler.yml | 26 ++++++++++++++++++++++++++ .github/workflows/labeler.yml | 30 ++++++++++++++++++++++++++++++ 2 files changed, 56 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..39bbbc3766 --- /dev/null +++ b/.github/labeler.yml @@ -0,0 +1,26 @@ +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +'on:blueprints': + - blueprints/**/* +'on:documentation': + - '**/*.md' + - assets/**/* + - tests/**/* +'on:FAST': + - fast/**/* +'on:modules': + - modules/**/* +'on:tools': + - tools/**/* diff --git a/.github/workflows/labeler.yml b/.github/workflows/labeler.yml new file mode 100644 index 0000000000..c68c4dd303 --- /dev/null +++ b/.github/workflows/labeler.yml @@ -0,0 +1,30 @@ +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +name: "Label Pull Requests" + +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 }}" + sync-labels: true