Skip to content

ci: align pre-commit hooks and GitHub templates#22

Open
mc-nv wants to merge 13 commits into
mainfrom
mchornyi/TRI-1100/github-align-hooks-and-templates
Open

ci: align pre-commit hooks and GitHub templates#22
mc-nv wants to merge 13 commits into
mainfrom
mchornyi/TRI-1100/github-align-hooks-and-templates

Conversation

@mc-nv

@mc-nv mc-nv commented Jul 18, 2026

Copy link
Copy Markdown
Contributor

What does the PR do?

Aligns this repository with the org-wide setup consolidated in triton-inference-server/.github:

  • .pre-commit-config.yaml: shared baseline hooks, conventional-commit message validation (commit-msg stage), and the centralized add-license hook from the org .github repository (rev: v1.0.0 — excludes .github/ templates, never rewrites LICENSE files).
  • Pre-commit CI runs only on files modified by the PR.
  • Caller stub for the org-wide reusable conventional-pr workflow (@v1.3.0): validates the PR title against Conventional Commits (hard gate — it becomes the squash-merge commit), derives one human-readable label per distinct type found in the title and all conforming commit subjects (e.g. ci:CI/CD, feat:feature, fix:fix), enforces org-wide label colors/descriptions, detects cherry-picks, and fails if no type is derivable and no type label is assigned.
  • No per-repo templates: PR templates and issue routing are inherited from the org-wide defaults in triton-inference-server/.github (issues route to the server repository).

Depends on triton-inference-server/.github#5 being merged and tagged (current: v1.3.0) — CI stays red here until the tag exists.

Pros / Cons

Pros

  • Single home (org .github repo) for hooks, templates, issue routing, and the PR-title workflow — one change propagates everywhere.
  • Repos carry only a config file and two small workflow stubs; no template copies to drift.
  • Commit/PR title format enforced both locally (commit-msg hook) and in CI (reusable workflow), with automatic type labels.
  • License hooks never modify LICENSE files.

Cons / risks

  • Version-pinned dependency on the org .github repository (tags are write-once; changes ship as a new tag + rev bump).
  • Template inheritance requires the org .github repository to remain public.

Related Issues / PRs

  • Resolves: TRI-1100

Related PRs:

Test plan

  • pre-commit validate-config passes; pre-commit run --files <PR diff> passes locally with the centralized hooks pinned to the .github branch SHA.
  • After .github#5 merges and v1.0.0 exists: the conventional-pr check validates this PR's own title and applies the ci label.
  • No LICENSE file content is changed by this PR.

Caveats

  • None beyond the merge-order note above.

Checklist

  • PR title follows <commit_type>: <Title> (conventional commit)
  • I ran pre-commit locally on all files changed by this PR and it passes
  • Copyright header is correct on all changed files
  • External contributors: I have read the Contribution guidelines and signed the Contributor License Agreement

Adopt the shared pre-commit baseline: two-line SPDX header, conventional
commit message validation (commit-msg stage), and the centralized
add-license / add-spdx-license hooks from developer_tools v0.2.0.
Run pre-commit CI only on files modified by the PR, and roll out the
standard issue templates and the simplified single PR template.

TRI-1100
@mc-nv mc-nv self-assigned this Jul 18, 2026
This was referenced Jul 18, 2026
Legal's Copyright / License Header Guidance specifies the SPDX form
without a comma after the year.

TRI-1100
@mc-nv
mc-nv marked this pull request as ready for review July 18, 2026 02:05
mc-nv added 2 commits July 17, 2026 23:27
Issues for all Triton components are tracked in
triton-inference-server/server; disable blank issues here and point the
new-issue chooser at the server repository.

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
Vinya567
Vinya567 previously approved these changes Jul 20, 2026
Adopt the shared pre-commit baseline: conventional-commit message
validation (commit-msg stage) and the centralized add-license hook from
the org .github repository (v1.0.0 - excludes .github/ templates and
never rewrites LICENSE files). Run pre-commit CI only on files modified
by the PR, and add the caller stub for the org-wide conventional-pr
reusable workflow (PR title validation + type labeling).

PR and issue templates are no longer stored per repository: they are
inherited from the org-wide defaults in triton-inference-server/.github
(issues route to the server repository).

TRI-1100
Org-wide label color scheme and cherry-pick detection.

TRI-1100
Human-readable type labels with enforced descriptions and colors.

TRI-1100
@github-actions github-actions Bot added CI/CD Continuous integration and workflow changes (ci: PRs) and removed ci labels Jul 20, 2026
@github-actions github-actions Bot added the chore Maintenance work, no production code change (chore: PRs) label Jul 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

chore Maintenance work, no production code change (chore: PRs) CI/CD Continuous integration and workflow changes (ci: PRs)

Development

Successfully merging this pull request may close these issues.

2 participants