Skip to content

Commit

Permalink
KAFKA-17542: Use actions/labeler for automatic PR labeling (#17208)
Browse files Browse the repository at this point in the history
Reviewers: Chia-Ping Tsai <[email protected]>, David Arthur <[email protected]>
  • Loading branch information
TaiJuWu authored Sep 19, 2024
1 parent 5701306 commit 3783385
Show file tree
Hide file tree
Showing 2 changed files with 155 additions and 0 deletions.
124 changes: 124 additions & 0 deletions .github/configs/labeler.yml
Original file line number Diff line number Diff line change
@@ -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/**'
31 changes: 31 additions & 0 deletions .github/workflows/labeler.yml
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 3783385

Please sign in to comment.