From d86b0253a8e5dc34677c8397b10810d66713214b Mon Sep 17 00:00:00 2001 From: Xiduo You Date: Thu, 1 Aug 2024 16:20:29 +0800 Subject: [PATCH] [INFRA] Support automatically label new pull requests (#6668) --- .github/labeler.yml | 95 +++++++++++++++++++++++++++++++++++ .github/workflows/labeler.yml | 30 +++++++++++ 2 files changed, 125 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 000000000000..878f9fae05cc --- /dev/null +++ b/.github/labeler.yml @@ -0,0 +1,95 @@ +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You 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. + + +INFRA: + - changed-files: + - any-glob-to-any-file: [ + '.github/**/*', + '.asf.yaml', + '.gitattributes', + 'LICENSE', + 'LICENSE-binary', + 'NOTICE', + 'NOTICE-binary' + ] + +BUILD: + - changed-files: + - any-glob-to-any-file: [ + 'dev/**/*', + 'cpp/compile.sh', + 'ep/build-velox/src/get_velox.sh', + 'ep/build-velox/src/build_velox.sh', + 'ep/build-clickhouse/src/build_clickhouse.sh' + ] + +DOCS: + - changed-files: + - any-glob-to-any-file: [ + 'docs/**/*', + '**/README.md', + '**/CONTRIBUTING.md' + ] + +CORE: + - changed-files: + - any-glob-to-any-file: [ + 'gluten-core/**/*', + 'shims/**/*', + 'gluten-ras/**/*', + 'gluten-ui/**/*', + 'gluten-ut/**/*', + 'package/**/*', + 'pom.xml' + ] + +VELOX: + - changed-files: + - any-glob-to-any-file: [ + 'gluten-data/**/*', + 'backends-velox/**/*', + 'ep/build-velox/**/*', + 'cpp/**/*' + ] + +CLICKHOUSE: + - changed-files: + - any-glob-to-any-file: [ + 'backends-clickhouse/**/*', + 'ep/build-clickhouse/**/*', + 'cpp-ch/**/*' + ] + +DATA_LAKE: + - changed-files: + - any-glob-to-any-file: [ + 'gluten-iceberg/**/*', + 'gluten-delta/**/*' + ] + +RSS: + - changed-files: + - any-glob-to-any-file: [ + 'gluten-celeborn/**/*', + 'gluten-uniffle/**/*' + ] + +TOOLS: + - changed-files: + - any-glob-to-any-file: [ + 'tools/**/*' + ] + diff --git a/.github/workflows/labeler.yml b/.github/workflows/labeler.yml new file mode 100644 index 000000000000..d2ddaec8f835 --- /dev/null +++ b/.github/workflows/labeler.yml @@ -0,0 +1,30 @@ +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You 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: + label: + name: Label pull requests + runs-on: ubuntu-latest + permissions: + contents: read + pull-requests: write + steps: + - uses: actions/labeler@v5 + with: + repo-token: "${{ secrets.GITHUB_TOKEN }}" + sync-labels: true