Add tools/python/compile_contributors.py --paths option#28710
Merged
Conversation
Add a new --paths option to compile_contributors.py to limit git history queries using pathspecs. Apply the path filter to both base and target git log collection and log the active path filter in logs.txt. Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
Pull request overview
Adds a --paths option to tools/python/compile_contributors.py so contributor compilation can be limited to commits touching selected git pathspecs.
Changes:
- Documents
--pathsusage with root-anchored git pathspec examples. - Adds argparse support for one or more path filters.
- Applies the pathspec suffix to both base and target
git logcalls and logs the active filter.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
tianleiwu
approved these changes
May 28, 2026
Contributor
tianleiwu
left a comment
There was a problem hiding this comment.
Clean, well-scoped addition. The paths_args suffix is constructed once and appended consistently to both git log invocations. Good use of -- separator for pathspec disambiguation, nargs="+" to prevent empty path lists, and clear documentation of the cherry-pick meta-PR expansion caveat. No concerns.
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.
Description
Add a new
--pathsoption tocompile_contributors.pyto limit git history queries using pathspecs.Apply the path filter to both base and target git log collection and log the active path filter in logs.txt.
Motivation and Context
Allow
compile_contributors.pyto be used for releases where relevant changes are largely limited to a subset of the codebase. E.g., we can limit the paths to WebGPU EP-related files for the WebGPU plugin EP release.