Add pre-commit hooks to node-hub-compose-example #1
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Mark/node-hub-compose-example#1
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Repository
node-hub-compose-exampledoes not have pre-commit hooks configured. Evaluate the repo's language/tooling and add appropriate hooks (.pre-commit-config.yamlfor Python,lefthook.ymlfor Node, or.githooks/pre-commitfor simpler repos).⏸ Needs Decision
What needs to be decided?
blocked:needs-decisionlabel to route back to triage.Blocking factors:
Scope: small Risk: low Spec: partial Type: chore
Summary: Add or improve pre-commit hooks for the compose-example repo (currently has a basic .githooks/pre-commit with yamllint validation)
Suggestion: Repo already has
.githooks/pre-commit— the simplest appropriate form for this 4-file YAML-only repo. Could enhance it withdocker-compose configvalidation, or the issue can be resolved as-is since hooks already exist. No Python/Node.js ecosystem to justify pre-commit.com or lefthook.Rationale: scope=small: 4 files total, 0 new dependencies, trivial logic. risk=low: purely additive quality gate, no production code. spec=partial: the issue premise ('does not have pre-commit hooks') is factually incorrect —
.githooks/pre-commitalready exists with working yamllint validation — but the intent to ensure quality gates is aligned. type=chore: dev workflow improvement, not a feature/bug. suggestion: the current.githooks/pre-commitis actually the right fit for a YAML-only Docker-compose repo; pre-commit.com or lefthook would introduce unnecessary dependency weight for 2 config files.To unblock: Remove the
blocked:needs-decisionlabel. The triage will apply the appropriate outcome based on your choice above.Quickfix landed on origin/main as
7008a26(.githooks/pre-commit, yamllint on staged YAML with the relaxed preset). Repo has only YAML content (app.yml + docker-compose.yml) so a single file in.githooks/pluscore.hooksPath=.githooksis the right shape.Verified end-to-end:
git ls-tree origin/main .githooks/pre-commit→100755 blob aed6865...bash .githooks/pre-commit(with a tracked YAML file staged) →YAML validation passed, exit 0yamllinterror outputClosing #1.