Skip to content

refactor: rename push-review to Pushgate and update installation script#23

Merged
dbrosio3 merged 1 commit into
mainfrom
issue-4-pushgate-pre-push-runner
May 22, 2026
Merged

refactor: rename push-review to Pushgate and update installation script#23
dbrosio3 merged 1 commit into
mainfrom
issue-4-pushgate-pre-push-runner

Conversation

@dbrosio3
Copy link
Copy Markdown
Member

@dbrosio3 dbrosio3 commented May 22, 2026

Description

Introduces the M1 hook-to-runner boundary for Pushgate. The installed pre-push hook is now a small delegator into a managed pushgate command, with a protocol check and focused reinstall guidance when the runner is missing or incompatible.

The first runner entrypoint intentionally passes through pre-push after accepting Git hook args and draining stdin. Changed-file policy, deterministic command execution, skip controls, and AI policy stay with their owning follow-up issues.

Closes #4

Type of change

  • fix: — Bug fix (patch version bump)
  • feat: — New feature (minor version bump)
  • feat!: / fix!: — Breaking change (major version bump)
  • docs: — Documentation only (no version bump)
  • chore: — Maintenance or config (no version bump)
  • refactor: — Code restructure, no behaviour change (no version bump)

Changes made

  • Added the standalone Node runner entrypoint with the hook-protocol probe and pass-through pre-push command.
  • Replaced the legacy full hook body with a thin delegator that resolves $HOME/.pushgate/bin/pushgate, validates protocol 1, forwards Git args/stdin, and returns the runner exit code.
  • Updated install.sh to install the managed runner, preserve pre-push backups, use rootstrap/ai-pushgate assets, and install .pushgate.yml templates instead of .push-review.yml.
  • Reworked hook harness coverage around the runner boundary and added runner and installer tests with isolated Git repos and stubbed downloads.
  • Updated README and contributing guidance to describe the current runner boundary and Node requirement without pulling later policy execution into this issue.

Testing

  • pnpm test passes
  • pnpm run check:shell passes with no output
  • pnpm run lint:shell passes
  • Manually tested the hook on a real repository
  • Tested on macOS
  • Tested on Linux

Covered by tests:

  • Hook arg/stdin forwarding, runner exit-code propagation, missing/non-executable runner diagnostics, protocol mismatch diagnostics, and an installed-hook real push smoke path.
  • Installer-managed runner placement, hook backup preservation, .pushgate.yml creation, config no-overwrite behavior, and no new .push-review.yml install destination.
  • Runner protocol output, pass-through pre-push stdin draining, and unsupported command usage errors.

Checklist

  • Commit messages follow Conventional Commits
  • No eval, heredoc variable expansion, or unquoted variable interpolation in shell scripts
  • File lists passed as arrays, never as interpolated strings
  • VERSION, CHANGELOG.md, .release-please-manifest.json, and release-please-config.json were not manually edited — these are managed by release-please
  • New template added to the table in README.md (not applicable; no new template)
  • New template name added to install.sh usage comment (not applicable; no new template)

Screenshots / output

No screenshots. Terminal-facing behavior is covered by hook and installer diagnostics in the automated tests.

- Updated the installer script to reflect the new name "Pushgate" instead of "push-review".
- Changed the repository URLs in the installation script to point to the new Pushgate repository.
- Modified output messages in the installer for consistency with the new naming.
- Adjusted the configuration file name from `.push-review.yml` to `.pushgate.yml`.
- Enhanced error handling and argument parsing in the installation script.
- Added tests for the installation process, ensuring the managed runner, hook backup, and configuration are correctly set up.
- Introduced a new runner test suite to validate the behavior of the Pushgate runner.
- Updated hook tests to accommodate the new runner and its expected behavior.
- Removed legacy tool and provider stubs in favor of a managed runner approach.
@dbrosio3 dbrosio3 merged commit ba5216b into main May 22, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

M1: Introduce thin pre-push hook plus pushgate runner

1 participant