From 62d6846fa8fb0aef2b117f35f650d5e87cf12683 Mon Sep 17 00:00:00 2001 From: Yingge He Date: Sat, 11 Jul 2026 03:37:58 -0700 Subject: [PATCH 1/3] Add centralized pre-commit hook --- .pre-commit-config.yaml | 7 ++++++- LICENSE | 2 +- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index e0a4bc08a..d78395a30 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,4 +1,4 @@ -# Copyright 2023-2025, NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# Copyright 2023-2026, NVIDIA CORPORATION & AFFILIATES. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions @@ -82,3 +82,8 @@ repos: exclude: >- (?x) ^(?!(src/c\+\+/perf_analyzer/genai-perf/)).*\.py$ + +- repo: https://github.com/triton-inference-server/pre-commit-hooks + rev: v0.1.0 + hooks: + - id: add-license diff --git a/LICENSE b/LICENSE index e8584b917..f47d27c8f 100644 --- a/LICENSE +++ b/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2021, NVIDIA CORPORATION. All rights reserved. +Copyright (c) 2021-2026, NVIDIA CORPORATION. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions From 6b3da28a03f8c8f6b66854164f6bd940343b36c5 Mon Sep 17 00:00:00 2001 From: Yingge He Date: Mon, 13 Jul 2026 17:23:44 -0700 Subject: [PATCH 2/3] Re-point add-license hook to developer_tools --- .pre-commit-config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index d78395a30..9663724b1 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -83,7 +83,7 @@ repos: (?x) ^(?!(src/c\+\+/perf_analyzer/genai-perf/)).*\.py$ -- repo: https://github.com/triton-inference-server/pre-commit-hooks +- repo: https://github.com/triton-inference-server/developer_tools rev: v0.1.0 hooks: - id: add-license From 5dc0d542468363eeabb12ebbcd082b1c360d6a5a Mon Sep 17 00:00:00 2001 From: Yingge He Date: Mon, 13 Jul 2026 18:03:18 -0700 Subject: [PATCH 3/3] Scope pre-commit CI to modified files only --- .github/workflows/pre-commit.yml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/.github/workflows/pre-commit.yml b/.github/workflows/pre-commit.yml index 4fa187324..4dbce6b10 100644 --- a/.github/workflows/pre-commit.yml +++ b/.github/workflows/pre-commit.yml @@ -1,4 +1,4 @@ -# Copyright 2023-2025, NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# Copyright 2023-2026, NVIDIA CORPORATION & AFFILIATES. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions @@ -34,5 +34,12 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v5.0.0 + with: + fetch-depth: 2 + - name: Get modified files + id: modified-files + run: echo "modified_files=$(git diff --name-only -r HEAD^1 HEAD | xargs)" >> $GITHUB_OUTPUT - uses: actions/setup-python@v6.0.0 - uses: pre-commit/action@v3.0.1 + with: + extra_args: --files ${{ steps.modified-files.outputs.modified_files }}