Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions .github/labeler.yml
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
Copy link
Copy Markdown
Contributor

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?

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1

# 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/**'
23 changes: 23 additions & 0 deletions .github/workflows/pr-auto-label.yml
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'
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The only time this would be false is on a fork, but who cares about that? If someone wants to label PRs on their fork, that doesn't affect anything in this repo, and who are we to prevent someone from labeling PRs on their fork?

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The 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