ci: migrate the centralized add-license hook to the org .github repository#61
Open
mc-nv wants to merge 14 commits into
Open
ci: migrate the centralized add-license hook to the org .github repository#61mc-nv wants to merge 14 commits into
mc-nv wants to merge 14 commits into
Conversation
Add tools/add_spdx_header.py as a centralized pre-commit hook that migrates each source file to the two-line SPDX header the first time it is touched (maintain / migrate legacy NVIDIA BSD header / insert). Exclude .github/ from add-license so GitHub issue/PR templates keep their YAML frontmatter first. Make add-license read the LICENSE file without rewriting its copyright year — consumer repos' LICENSE files must never be modified by hooks. Requires tagging v0.2.0 after merge. Also align this repository with the shared pre-commit baseline and GitHub templates. TRI-1100
This was referenced Jul 18, 2026
Open
ci: align pre-commit hooks and GitHub templates
triton-inference-server/checksum_repository_agent#14
Open
Open
CI here must validate the hook code being merged rather than an already-published tag; consumer repositories keep referencing rev: v0.2.0. TRI-1100
mc-nv
marked this pull request as ready for review
July 18, 2026 01:00
Legal's Copyright / License Header Guidance specifies the SPDX form without a comma after the year: SPDX-FileCopyrightText: Copyright (c) <year> NVIDIA CORPORATION & AFFILIATES. All rights reserved. Emit that form from add_spdx_header.py, keep both hooks tolerant of the legacy comma variant, and normalize the headers introduced by this change. TRI-1100
Adopt the canonical PR template set from triton-inference-server/server (default chooser plus internal/external contribution templates) so every repository presents the same PR experience. The manual "Commit Type" checkbox section is dropped — the conventional-pre-commit hook (commit-msg stage) enforces it automatically. TRI-1100
yinggeh
reviewed
Jul 20, 2026
| additional_dependencies: [tomli] | ||
| args: ["--toml", "pyproject.toml"] | ||
| exclude: (?x)^(.*stemmer.*|.*stop_words.*|^CHANGELOG.md$) | ||
| # Validates commit messages against the Conventional Commits format |
Contributor
There was a problem hiding this comment.
Question: This hook only validates commit messages. It does not check pull request titles. And we don't need to add rules to the commits because everything will be squashed at the end.
yinggeh
reviewed
Jul 20, 2026
| Returns the contents of the LICENSE file. | ||
|
|
||
| Note: LICENSE file maintains a year range if it has an older starting year. | ||
| Note: The LICENSE file itself is never modified by this hook; its |
Contributor
There was a problem hiding this comment.
Why not? When do we update the LICENSE copyrights?
The hook definition and tools/add_copyright.py move to triton-inference-server/.github (v1.0.0) so hooks, templates, and reusable workflows live under one roof. Existing consumers pinned to this repository's v0.x tags keep working - tags are immutable. Also aligns this repository with the shared baseline (conventional commit validation, modified-files pre-commit CI, org-wide templates, conventional-pr caller stub). TRI-1100
10 tasks
Org-wide label color scheme and cherry-pick detection. TRI-1100
Human-readable type labels with enforced descriptions and colors. TRI-1100
mc-nv
requested review from
Vinya567,
mattwittwer,
mudit-eng,
nv-rinig and
yinggeh
July 20, 2026 23:32
Vinya567
approved these changes
Jul 20, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does the PR do?
Migrates the centralized
add-licensepre-commit hook (definition +tools/add_copyright.py) out of this repository into the org-wide defaults repo triton-inference-server/.github (see triton-inference-server/.github#5), so hooks, templates, issue routing, and reusable workflows live under one roof with a single tag line.Existing consumers pinned to this repository's
v0.xtags keep working — tags are immutable; new consumers reference.github@v1.0.0. This repository itself becomes a plain consumer, aligned with the shared baseline (conventional-commit validation, modified-files CI, org-wide templates, conventional-pr caller stub).Depends on triton-inference-server/.github#5 being merged and tagged (current:
v1.3.0).Related Issues / PRs
Related PRs:
Test plan
pre-commit validate-configpasses; hooks pass on the PR diff with the centralized hooks pinned to the .github branch SHA.Caveats
v0.2.xtags remain in place for any external consumer; they can be retired once nothing references them.Checklist
<commit_type>: <Title>(conventional commit)