diff --git a/.github/configs/labeler.yml b/.github/configs/labeler.yml new file mode 100644 index 000000000000..1181061c1514 --- /dev/null +++ b/.github/configs/labeler.yml @@ -0,0 +1,124 @@ +# 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. + +build: + - changed-files: + - any-glob-to-any-file: + - '.github/**' + - 'gradle/**' + - '*gradlew*' + +clients: +- changed-files: + - any-glob-to-any-file: + - 'clients/**' + + +tests: +- all: + - changed-files: + - any-glob-to-all-files: + - 'tests/**' + - '**/test/**' + + +connect: +- all: + - changed-files: + - any-glob-to-any-file: + - 'connect/**/*' + - all-globs-to-all-files: + - '!connect/mirror/*' + +mirror-maker-2: +- changed-files: + - any-glob-to-any-file: + - 'connect/mirror/**' + + +core: +- changed-files: + - any-glob-to-any-file: + - 'core/**' + - '*server*/**' + +storage: +- changed-files: + - any-glob-to-any-file: + - 'storage/**' + +streams: +- changed-files: + - any-glob-to-any-file: + - 'streams/**' + +tools: +- changed-files: + - any-glob-to-any-file: + - 'tools/**' + - 'trogdor/**' + - 'vagrant/**' + - 'committer-tools/**' + - 'log4j-appender/**' + - 'shell/**' + +docs: +- changed-files: + - any-glob-to-all-files: + - 'docs/**' + - '**/*.md' + - 'examples/**' + +generator: + - changed-files: + - any-glob-to-any-file: + - 'generator/**' + +transactions: + - changed-files: + - any-glob-to-any-file: + - 'transaction-coordinator/**' + +KIP-932: + - changed-files: + - any-glob-to-any-file: + - 'share/**' + - 'share-coordinator/**' + +docker: +- changed-files: + - any-glob-to-any-file: + - 'docker/**' + +performance: +- changed-files: + - any-glob-to-any-file: + - 'jmh-benchmarks/**' + +consumer: + - changed-files: + - any-glob-to-any-file: + - 'clients/src/main/java/org/apache/kafka/clients/consumer/**' + +producer: + - changed-files: + - any-glob-to-any-file: + - 'clients/src/main/java/org/apache/kafka/clients/producer/**' + +kraft: + - changed-files: + - any-glob-to-any-file: + - 'metadata/**' + - 'raft/**' diff --git a/.github/workflows/labeler.yml b/.github/workflows/labeler.yml new file mode 100644 index 000000000000..2fee16426c04 --- /dev/null +++ b/.github/workflows/labeler.yml @@ -0,0 +1,31 @@ +# 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: "Pull Request Labeler" +on: + pull_request_target: + types: [opened, reopened, synchronize] + + +jobs: + label_PRs: + permissions: + contents: read + pull-requests: write + runs-on: ubuntu-latest + steps: + - uses: actions/labeler@v5 + with: + configuration-path: .github/configs/labeler.yml