Skip to content

Harden start.sh, add unit/e2e tests, fix token exposure and push_only_tags - #404

Draft
ZPascal wants to merge 1 commit into
masterfrom
fix/review-findings
Draft

ZPascal wants to merge 1 commit into
masterfrom
fix/review-findings

Conversation

@ZPascal

@ZPascal ZPascal commented Oct 26, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

  • Refactor start.sh: no more executing input as commands, quoted cd, push args built with "$@", remote URL resolved once (fixes directory values containing spaces).
  • Add tests/unit.sh (fake git, asserts on flags) and tests/e2e.sh (real git against a local bare repo via insteadOf), plus a Tests workflow with shellcheck.
  • Token is passed via a host-scoped http.extraheader in GIT_CONFIG_* env instead of being embedded in the remote URL (no longer in process args or git error output).
  • push_only_tags now never pushes the branch, also without force_with_lease (matches the documented behavior).
  • start.js exits with 1 instead of -1 (255).

Behavior changes to review

  • push_only_tags: true without force_with_lease previously also pushed HEAD:<branch>.
  • Auth header is sent in addition to any header actions/checkout persisted; not reset.

Test plan

  • bash tests/unit.sh (38 pass)
  • bash tests/e2e.sh (17 pass)
  • shellcheck in CI (not run locally)

@ZPascal ZPascal self-assigned this Oct 26, 2026
@ZPascal
ZPascal marked this pull request as draft October 26, 2026 19:03
@ZPascal
ZPascal force-pushed the fix/review-findings branch from 73ee3f9 to dd18af1 Compare October 26, 2026 19:07
@ZPascal
ZPascal force-pushed the fix/review-findings branch from dd18af1 to 38fc04d Compare October 26, 2026 21:51
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.

1 participant