Add pre-commit hooks to node-hub-compose-example #1

Closed
opened 2026-06-04 00:37:07 +00:00 by Mark · 2 comments
Owner

Repository node-hub-compose-example does not have pre-commit hooks configured. Evaluate the repo's language/tooling and add appropriate hooks (.pre-commit-config.yaml for Python, lefthook.yml for Node, or .githooks/pre-commit for simpler repos).

Repository `node-hub-compose-example` does not have pre-commit hooks configured. Evaluate the repo's language/tooling and add appropriate hooks (`.pre-commit-config.yaml` for Python, `lefthook.yml` for Node, or `.githooks/pre-commit` for simpler repos).
Author
Owner

⏸ Needs Decision

What needs to be decided?

  • Is this issue still relevant? If yes, remove the blocked:needs-decision label to route back to triage.

Blocking factors:

  • Didn't meet auto-approve criteria — scope=small, risk=low, spec=partial

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 with docker-compose config validation, 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-commit already 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-commit is 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-decision label. The triage will apply the appropriate outcome based on your choice above.

## ⏸ Needs Decision **What needs to be decided?** - **Is this issue still relevant?** If yes, remove the `blocked:needs-decision` label to route back to triage. **Blocking factors:** - **Didn't meet auto-approve criteria** — scope=small, risk=low, spec=partial --- **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 with `docker-compose config` validation, 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-commit` already 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-commit` is 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-decision` label. The triage will apply the appropriate outcome based on your choice above.
Mark closed this issue 2026-09-14 16:26:41 +00:00
Author
Owner

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/ plus core.hooksPath=.githooks is the right shape.

Verified end-to-end:

  • hook present on origin/main: git ls-tree origin/main .githooks/pre-commit → 100755 blob aed6865...
  • clean YAML: bash .githooks/pre-commit (with a tracked YAML file staged) → YAML validation passed, exit 0
  • broken YAML: hook exits 1 with yamllint error output

Closing #1.

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/` plus `core.hooksPath=.githooks` is the right shape. Verified end-to-end: - hook present on origin/main: `git ls-tree origin/main .githooks/pre-commit` → `100755 blob aed6865...` - clean YAML: `bash .githooks/pre-commit` (with a tracked YAML file staged) → `YAML validation passed`, exit 0 - broken YAML: hook exits 1 with `yamllint` error output Closing #1.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Mark/node-hub-compose-example#1
No description provided.