Sys-8665 copywrite - #41
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Adds HashiCorp Copywrite-based copyright header enforcement.
Changes:
- Adds Copywrite templates, configuration, and hooks.
- Integrates header validation into the GitHub Action.
- Documents installation and usage.
Reviewed changes
Copilot reviewed 13 out of 13 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
README.md |
Documents Copywrite usage. |
.pre-commit-hooks.yaml |
Registers Copywrite hooks. |
action.yml |
Adds header validation. |
main.py |
Adds copyright header. |
main/commit-msg.py |
Adds copyright header. |
main/githooks.py |
Adds copyright header. |
main/pre-commit.py |
Adds copyright header. |
main/pre-merge-commit.py |
Adds copyright header. |
main/hooks/copywrite_check.sh |
Implements validation hook. |
main/hooks/copywrite_fix.sh |
Implements formatting hook. |
main/copywrite/.copywrite.hcl |
Configures Copywrite rules. |
main/copywrite/headers/ccdc_hash.tmpl |
Defines hash-comment headers. |
main/copywrite/headers/ccdc_slash.tmpl |
Defines slash-comment headers. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
shanooni024
approved these changes
Aug 28, 2026
Contributor
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 13 out of 13 changed files in this pull request and generated 5 comments.
Suppressed comments (1)
main/githooks.py:1047
filesidentifies paths staged in the index, but Copywrite edits each path's working-tree version and this command stages the whole file. If a developer partially staged a file, all unrelated unstaged edits are silently added to the commit. Preserve the index/working-tree split (or refuse fix mode for partially staged paths) instead of runninggit addon the full files.
subprocess.run(['git', 'add'] + files, stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL)
Contributor
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 12 out of 12 changed files in this pull request and generated 7 comments.
Suppressed comments (1)
README.md:61
- This warning is only emitted after
hooks.copywritehas been explicitly enabled; with the documented default (false/unset),run_copywritereturns before checking PATH and prints nothing. Qualify the note so it matches the actual opt-in behavior.
> **Note:** If `copywrite` is not installed on your machine, native hooks will continue to run all other standard checks and display a gentle warning without failing your commit.
layfield-ccdc
approved these changes
Aug 28, 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.
No description provided.