Skip to content

Packs / github-ops-public

commit-hygiene

Commit rules for every repo: author and committer = Waleed only, no Co-Authored-By/AI attribution lines, plain messages, rebase onto origin before pushing; enforced by a commit-msg hook and a safe-push script.

Install

logicpacks pack use github-ops-public/commit-hygiene
get_pack github-ops-public/commit-hygiene

The second line is the MCP tool call for the LogicPacks connector (Claude Code, Codex, Claude.ai and others). The first run of a pack someone else wrote asks for your yes.

Keys it needs (names only)

None.

Playbooks included

  • Spec: spec/SPEC.md (goal, steps, edge cases, don’ts)
  • Routes: gh-cli
  • Checks: 2 in outcome/checks.yaml
  • Code: commit-msgsafe_push.sh
  • Tools: git, bash

Usage, last 8 weeks

New: no recorded use yet.

Purpose (from spec/SPEC.md)

Commit rules for every repo: author and committer = Waleed only, no Co-Authored-By/AI attribution lines, plain messages, rebase onto origin before pushing; enforced by a commit-msg hook and a safe-push script.

Goal

Steps

  1. Install the hook: cp code/commit-msg .git/hooks/commit-msg && chmod +x .git/hooks/commit-msg (rejects Co-authored-by trailers, 'Generated with' lines and AI-vendor noreply addresses).
  2. Before every push: bash code/safe_push.sh [branch] = fetch, rebase onto origin/, push (stops on conflicts).
  3. PR/MR descriptions, tags, releases and changelogs follow the same rule.

Edge cases

  • Other sessions push to the same main: always rebase right before pushing.
  • GitHub may keep attribution in a merged PR's commits; prevent it, it can't always be removed later.

Don'ts

  • Don't add Co-Authored-By or 'Generated with' lines anywhere.