Repository navigation
ci: label pull requests from workflow_run instead of pull_request_target #7482
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,36 @@ | ||
| # 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 trigger | ||
|
|
||
| # Starts the labeler for a pull request. This run gets a read-only token and does nothing itself; | ||
| # when it completes, label_prs.yml runs from the default branch through workflow_run and writes | ||
| # the labels. Kept separate from Comet CI so labels arrive in seconds rather than after CI. | ||
| on: | ||
| pull_request: | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The events reference says |
||
| types: [opened, synchronize, reopened] | ||
|
|
||
| permissions: {} | ||
|
|
||
| jobs: | ||
| trigger: | ||
| runs-on: ubuntu-slim | ||
| timeout-minutes: 5 | ||
| steps: | ||
| - name: Hand off to label_prs.yml | ||
| run: echo "Labels for pull request ${{ github.event.pull_request.number }} are applied by label_prs.yml" | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nothing checks that this entry stays equal to the
name:oflabel_prs_trigger.yml. If either is renamed, labeling stops without a failing check.dev/ci/check-ci-config.pyalready guards the same pairing for the fork bridge (BRIDGE_WORKFLOWagainst the name ofci.yml, plus the repository guard). Could it cover this pair too?