Skip to content

Sys-8665 copywrite - #41

Merged
mmaharjan-ccdc merged 15 commits into
mainfrom
SYS-8665-copywrite
Aug 28, 2026
Merged

Sys-8665 copywrite#41
mmaharjan-ccdc merged 15 commits into
mainfrom
SYS-8665-copywrite

Conversation

@mmaharjan-ccdc

Copy link
Copy Markdown
Contributor

No description provided.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread main/copywrite/headers/ccdc_hash.tmpl
Comment thread main/copywrite/headers/ccdc_slash.tmpl
Comment thread action.yml Outdated
Comment thread README.md Outdated
Comment thread .pre-commit-hooks.yaml Outdated
Comment thread main/copywrite/headers/ccdc_hash.tmpl Outdated

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 13 out of 13 changed files in this pull request and generated 2 comments.

Comment thread action.yml
Comment thread main/hooks/copywrite_fix.sh Outdated
mmaharjan-ccdc and others added 4 commits August 25, 2026 21:29
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>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

  • files identifies 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 running git add on the full files.
                subprocess.run(['git', 'add'] + files, stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL)

Comment thread templates/compliance.yml Outdated
Comment thread main/githooks.py
Comment thread main/githooks.py Outdated
Comment thread README.md Outdated
Comment thread action.yml Outdated

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.copywrite has been explicitly enabled; with the documented default (false/unset), run_copywrite returns 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.

Comment thread templates/compliance.yml Outdated
Comment thread README.md Outdated
Comment thread .github/workflows/status_check.yml Outdated
Comment thread README.md
Comment thread templates/compliance.yml Outdated
Comment thread README.md Outdated
Comment thread main/githooks.py
@mmaharjan-ccdc
mmaharjan-ccdc merged commit ac8a33d into main Aug 28, 2026
6 checks passed
@mmaharjan-ccdc
mmaharjan-ccdc deleted the SYS-8665-copywrite branch August 28, 2026 14:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

4 participants