Skip to content

Commit 5e3f62f

Browse files
authored
Refactor Pushgate CLI to integrate pre-push hook and remove separate push command (#70)
- Updated documentation to reflect changes in the workflow, emphasizing the integration of Pushgate with Git's pre-push hook. - Removed the `push` command from the CLI, consolidating functionality into the `pre-push` command. - Eliminated the `push-args.ts` and `push.ts` modules, simplifying the codebase by removing unnecessary abstractions related to push operations. - Adjusted the `skip-controls.ts` to remove the `buildGitPushArgs` function, as it is no longer needed. - Deleted tests related to the `push` command and its associated functionality, ensuring the test suite reflects the current state of the codebase. - Updated existing tests to verify the absence of the `push` command and ensure proper handling of the new workflow. Co-authored-by: dbrosio3 <daniel.brosio@rootstrap.com>
1 parent 98aeffb commit 5e3f62f

13 files changed

Lines changed: 40 additions & 1778 deletions

File tree

README.md

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,8 @@ git push
3131
```
3232

3333
`git push` stays the main entry point. Pushgate plugs into it through the
34-
installed `pre-push` hook; `pushgate push` is an optional friendly wrapper for
35-
the same workflow. For long interactive runs, such as warning prompts plus local
36-
AI review, `pushgate push` runs the local Pushgate preflight before opening the
37-
native Git push and then invokes `git push --no-verify` after Pushgate passes.
34+
installed `pre-push` hook, so developers keep the usual Git workflow while
35+
local checks and AI review run before the push proceeds.
3836

3937
Local deterministic checks can block a push. Warning results require an explicit yes/no confirmation before the push continues. Local AI supports `blocking`, `advisory`, and `off` modes; `blocking` is the default, matching the review gate shown above. CI and PR checks remain the final enforcement point for policy that must survive local hook skips.
4038

@@ -229,15 +227,6 @@ git -c pushgate.skip-ai-check=true push
229227
git -c pushgate.skip-all-checks=true push
230228
```
231229

232-
The optional wrapper maps friendly flags to the same one-push config. It also
233-
runs Pushgate locally before the native network push, so long checks and warning
234-
prompts do not hold an already-open Git remote session idle:
235-
236-
```bash
237-
pushgate push --skip-ai-check
238-
pushgate push --skip-all-checks
239-
```
240-
241230
## Runner overrides
242231

243232
The installed hook resolves the Pushgate runner in this order:

0 commit comments

Comments
 (0)