dwsmith1983 commented on code in PR #5762: URL: https://github.com/apache/datafusion-comet/pull/5762#discussion_r3956295372
########## .github/workflows/label_prs.yml: ########## @@ -0,0 +1,83 @@ +# 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 + +# Runs on pull_request_target so it can label pull requests from forks. Nothing from the pull +# request is checked out or executed: the labeler reads the changed file list through the API +# and the title step reads the event payload. +on: + pull_request_target: + types: [opened, synchronize, reopened] + +permissions: + contents: read + pull-requests: write + +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number }} + cancel-in-progress: true + +jobs: + label: + runs-on: ubuntu-slim + steps: + - name: Label by changed paths + uses: actions/labeler@v7 + with: + configuration-path: .github/labeler.yml + sync-labels: false + + # The type label follows the conventional commit prefix in the title, matching how + # maintainers label by hand. Only on open, so later hand edits are not overwritten, and + # not for dependabot, whose PRs already carry the dependencies label. + - name: Label by title prefix + if: github.event.action == 'opened' && github.actor != 'dependabot[bot]' Review Comment: Right, one group per pull request let a push cancel the opened run mid-way, and nothing later re-adds the type label. Fixed in 20aaf6048 by keying the group on the event action as well, so synchronize runs replace only each other and the opened run always completes. Reopened runs get their own group for the same reason. Title relabeling itself stays open-only. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
