Skip to content
Merged
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
109 changes: 109 additions & 0 deletions .github/new-prs-labeler.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,109 @@
# Labels applied to PRs based on the files changed.
# Backend labels are set when any file under the backend's third_party/ directory changes.
# The DOC label is set when every changed file is a documentation file
# (matches the same "docs-only" definition used by check-docs-only action:
# *.md / *.yml / *.txt / CODEOWNERS, but NOT CMakeLists.txt).

# ---- Backend labels ----

nvidia:
- changed-files:
- any-glob-to-any-file:
- 'third_party/nvidia/**'

xpu:
- changed-files:
- any-glob-to-any-file:
- 'third_party/xpu/**'

hcu:
- changed-files:
- any-glob-to-any-file:
- 'third_party/hcu/**'

metax:
- changed-files:
- any-glob-to-any-file:
- 'third_party/metax/**'

iluvatar:
- changed-files:
- any-glob-to-any-file:
- 'third_party/iluvatar/**'

mthreads:
- changed-files:
- any-glob-to-any-file:
- 'third_party/mthreads/**'

f2reduce:
- changed-files:
- any-glob-to-any-file:
- 'third_party/f2reduce/**'

amd:
- changed-files:
- any-glob-to-any-file:
- 'third_party/amd/**'

cambricon:
- changed-files:
- any-glob-to-any-file:
- 'third_party/cambricon/**'

proton:
- changed-files:
- any-glob-to-any-file:
- 'third_party/proton/**'

ascend:
- changed-files:
- any-glob-to-any-file:
- 'third_party/ascend/**'

tle:
- changed-files:
- any-glob-to-any-file:
- 'third_party/tle/**'

aipu:
- changed-files:
- any-glob-to-any-file:
- 'third_party/aipu/**'

enflame:
- changed-files:
- any-glob-to-any-file:
- 'third_party/enflame/**'

tsingmicro:
- changed-files:
- any-glob-to-any-file:
- 'third_party/tsingmicro/**'

sunrise:
- changed-files:
- any-glob-to-any-file:
- 'third_party/sunrise/**'



# ---- DOC label ----
# This label is applied ONLY when the PR consists exclusively of documentation.
# It uses a strict inclusion list combined with an explicit exclusion of build files
# to ensure no functional code changes are mislabeled as "DOC".

DOC:
- all:
# Condition A: All must be document file extensions
- changed-files:
- any-glob-to-all-files:
- '**/*.md'
- '**/*.yml'
- '**/*.txt'
- '**/CODEOWNERS'

# Condition B: Must not contain CMakeLists.txt
- changed-files:
- all-globs-to-all-files:
- '!**/CMakeLists.txt'
26 changes: 26 additions & 0 deletions .github/workflows/new-prs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: "Labelling new pull requests"

# pull_request_target is used so that the workflow runs with write permissions
# even on PRs from forks, allowing labels to be applied.
# This is safe here because no code from the PR is checked out or executed;
# the labeler only reads the list of changed file paths.
on:
pull_request_target:
types:
- opened
- reopened
- ready_for_review
- synchronize
jobs:
label:
runs-on: ubuntu-latest
permissions:
contents: read
pull-requests: write
steps:
- id: labeler
uses: actions/labeler@v6
with:
repo-token: "${{ secrets.GITHUB_TOKEN }}"
sync-labels: true
configuration-path: .github/new-prs-labeler.yml
Loading