Skip to content

Commit e154500

Browse files
leofangclaude
andauthored
[no-ci] Add auto-labeling workflow for PRs based on changed paths (#1818)
* Add labeler config for auto-labeling PRs by path * Add auto-label workflow using actions/labeler v6 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * Add ci/ folder to CI/CD label mapping * Add SPDX header to labeler.yml to fix pre-commit check * Update labeler.yml --------- Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent b3ae845 commit e154500

File tree

2 files changed

+47
-0
lines changed

2 files changed

+47
-0
lines changed

.github/labeler.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
2+
#
3+
# SPDX-License-Identifier: Apache-2.0
4+
5+
# Configuration for https://github.com/actions/labeler
6+
# Auto-applies labels based on which files a PR changes.
7+
8+
cuda.bindings:
9+
- changed-files:
10+
- any-glob-to-any-file: 'cuda_bindings/**'
11+
12+
cuda.core:
13+
- changed-files:
14+
- any-glob-to-any-file: 'cuda_core/**'
15+
16+
cuda.pathfinder:
17+
- changed-files:
18+
- any-glob-to-any-file: 'cuda_pathfinder/**'
19+
20+
CI/CD:
21+
- changed-files:
22+
- any-glob-to-any-file:
23+
- '.github/**'
24+
- 'ci/**'
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# SPDX-FileCopyrightText: Copyright (c) 2024-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
2+
#
3+
# SPDX-License-Identifier: Apache-2.0
4+
5+
name: "CI: Auto-label PRs by path"
6+
7+
on:
8+
pull_request_target:
9+
types:
10+
- opened
11+
- synchronize
12+
13+
jobs:
14+
auto-label:
15+
name: Auto-label by changed paths
16+
if: github.repository_owner == 'NVIDIA'
17+
runs-on: ubuntu-latest
18+
permissions:
19+
contents: read
20+
pull-requests: write
21+
steps:
22+
- name: Apply labels
23+
uses: actions/labeler@634933edcd8ababfe52f92936142cc22ac488b1b # v6.0.1

0 commit comments

Comments
 (0)