Repository navigation
chore(docs): keep internal references out of docs and commit messages (LAB-8003) - #16
Conversation
Code Review Completed! 🔥The code review was successfully completed based on your current configurations. Kody Guide: Usage and ConfigurationInteracting with Kody
Providing Context (Files & MCPs)Add these hints in your PR description (or a comment) to unlock deeper checks:
Current Kody ConfigurationReview OptionsThe following review options are enabled or disabled:
Kody Code Review — 2 suggested fixes. 🛠️ Open Agent Prompt |
Code Review Completed! 🔥The code review was successfully completed based on your current configurations. Kody Guide: Usage and ConfigurationInteracting with Kody
Providing Context (Files & MCPs)Add these hints in your PR description (or a comment) to unlock deeper checks:
Current Kody ConfigurationReview OptionsThe following review options are enabled or disabled:
|
`git commit -v` hands the commit-msg hook the staged diff below git's cut line, so a clean message failed whenever the diff matched a pattern. Both hooks now run one script: it stops at the cut line, skips lines that start with core.commentChar, and skips only a Merge subject. The patterns live in one place instead of two.
|
@kody start-review |
Code Review Completed! 🔥The code review was successfully completed based on your current configurations. Kody Guide: Usage and ConfigurationInteracting with Kody
Providing Context (Files & MCPs)Add these hints in your PR description (or a comment) to unlock deeper checks:
Current Kody ConfigurationReview OptionsThe following review options are enabled or disabled:
|
…'s own merge and revert subjects
Code Review Completed! 🔥The code review was successfully completed based on your current configurations. Kody Guide: Usage and ConfigurationInteracting with Kody
Providing Context (Files & MCPs)Add these hints in your PR description (or a comment) to unlock deeper checks:
Current Kody ConfigurationReview OptionsThe following review options are enabled or disabled:
|
… of the cluster pattern
Code Review Completed! 🔥The code review was successfully completed based on your current configurations. Kody Guide: Usage and ConfigurationInteracting with Kody
Providing Context (Files & MCPs)Add these hints in your PR description (or a comment) to unlock deeper checks:
Current Kody ConfigurationReview OptionsThe following review options are enabled or disabled:
|
What
Adds two local pre-commit hooks that reject common patterns of internal references: ticket ids, secret-store paths, internal hosts and plan labels.
no-internal-referenceschecks the top-level,packages/*andcrates/*READMEs anddocs/.no-internal-references-commit-msgchecks the commit message. git hands the hook the raw message file, so the check stops at the scissors line thatgit commit -vputs above the staged diff, skips git's#comment lines, and skips a first line that is a merge, revert or reapply subject in the form git generates. Those lines quote branch names and earlier subjects.The docs check uses pygrep. The commit-message check is a short inline Python script in
.pre-commit-config.yaml(language: python) with the same patterns.The patterns are generic on purpose: a list of specific names would itself disclose them.
default_install_hook_typesincludescommit-msg, so a plainprek install(orpre-commit install) sets up both hooks.ck runREADME example reads the secret withop item getinstead of a secret-store URI. Same behaviour, and the example no longer matches the secret-store path pattern..pre-commit-config.yamlcarrying only these hooks.Why
User-facing docs collect worklogs and internal references unless something stops them at commit time. The rule these hooks back is What belongs in these docs.
Verification
Seeded violations, after
prek install, each using a ticket-shaped id (shown here as<id>). Neither commit landed, and the tree was clean afterwards:prek run no-internal-references --all-files: Passed. A default merge commit, whose subject quotes the branch name, passes the commit-message hook.A verbose commit (
git commit -v) with a clean message passes even when the staged diff matches a pattern. A hand-written subject that starts withMerge, and a#line with no space after the#, are still checked.