-
Notifications
You must be signed in to change notification settings - Fork 263
Add auto-labeling workflow for PRs based on changed paths #1818
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
base: main
Are you sure you want to change the base?
Changes from all commits
d898576
530e852
42d5e5c
cf63f32
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,24 @@ | ||
| # SPDX-FileCopyrightText: Copyright (c) 2024-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. | ||
| # | ||
| # SPDX-License-Identifier: Apache-2.0 | ||
|
|
||
| # Configuration for actions/labeler | ||
| # Auto-applies labels based on which files a PR changes. | ||
|
|
||
| cuda.bindings: | ||
| - changed-files: | ||
| - any-glob-to-any-file: 'cuda_bindings/**' | ||
|
|
||
| cuda.core: | ||
| - changed-files: | ||
| - any-glob-to-any-file: 'cuda_core/**' | ||
|
|
||
| cuda.pathfinder: | ||
| - changed-files: | ||
| - any-glob-to-any-file: 'cuda_pathfinder/**' | ||
|
|
||
| CI/CD: | ||
| - changed-files: | ||
| - any-glob-to-any-file: | ||
| - '.github/**' | ||
| - 'ci/**' | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,23 @@ | ||
| # SPDX-FileCopyrightText: Copyright (c) 2024-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. | ||
| # | ||
| # SPDX-License-Identifier: Apache-2.0 | ||
|
|
||
| name: "CI: Auto-label PRs by path" | ||
|
|
||
| on: | ||
| pull_request_target: | ||
| types: | ||
| - opened | ||
| - synchronize | ||
|
|
||
| jobs: | ||
| auto-label: | ||
| name: Auto-label by changed paths | ||
| if: github.repository_owner == 'NVIDIA' | ||
|
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 only time this would be
Collaborator
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. It's really just "don't bother running this where it doesn't apply." The guard just avoids running automation that would likely fail or be meaningless on forks, but it doesn't actively prevent anything. Seems like a good default to me. |
||
| runs-on: ubuntu-latest | ||
| permissions: | ||
| contents: read | ||
| pull-requests: write | ||
| steps: | ||
| - name: Apply labels | ||
| uses: actions/labeler@634933edcd8ababfe52f92936142cc22ac488b1b # v6.0.1 | ||
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.
Maybe include a link to the actions/labeler project docs?
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.
+1