Skip to content

Add interactive pre-push local CI prompt (backend/frontend/all) via repo-managed Git hooks#69

Merged
QA1S merged 7 commits into
mainfrom
copilot/copilotadd-cli-push-test-prompt
Apr 16, 2026
Merged

Add interactive pre-push local CI prompt (backend/frontend/all) via repo-managed Git hooks#69
QA1S merged 7 commits into
mainfrom
copilot/copilotadd-cli-push-test-prompt

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 9, 2026

This expands the existing CI/CD workflow work by adding a local pre-push gate: when developers run git push, they’re prompted to optionally run backend tests, frontend checks, or both before the push proceeds. The goal is to catch issues locally while keeping push behavior user-controlled.

  • Pre-push prompt hook (.githooks/pre-push)

    • Adds an interactive CLI prompt on push with four paths: all, backend, frontend, skip.
    • Runs the same core checks used in CI parity paths (backend pytest; frontend lint + typecheck + build).
    • Cancels push on invalid selection.
    • Safely no-ops in non-interactive contexts (no TTY), preventing automation/tooling failures.
  • Repo-level hook bootstrap (scripts/setup-git-hooks.sh)

    • Configures core.hooksPath to the tracked .githooks directory.
    • Ensures hook executable permissions are set.
    • Makes setup explicit and one-time for contributors.
  • Contributor docs (README.md)

    • Adds a short “Optional Local Pre-Push Checks” section with setup command and option mapping.
    • Documents bypass behavior (git push --no-verify) for explicit opt-out.
# one-time setup
./scripts/setup-git-hooks.sh

# on push, prompt appears:
# Choice (a/b/f/n):
# a -> backend + frontend checks
# b -> backend only
# f -> frontend only
# n -> skip and continue push

@vercel
Copy link
Copy Markdown
Contributor

vercel Bot commented Apr 9, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
padly Ready Ready Preview, Comment Apr 9, 2026 11:40pm

@QA1S QA1S marked this pull request as ready for review April 16, 2026 20:49
@QA1S QA1S merged commit e56c597 into main Apr 16, 2026
5 checks 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.

2 participants