Skip to content

feat: auto ssh signing and codebase refactor#73

Merged
Huerte merged 2 commits into
mainfrom
feature/auto-ssh-signing-and-refactor
May 30, 2026
Merged

feat: auto ssh signing and codebase refactor#73
Huerte merged 2 commits into
mainfrom
feature/auto-ssh-signing-and-refactor

Conversation

@Huerte
Copy link
Copy Markdown
Owner

@Huerte Huerte commented May 30, 2026

Type

  • Bug fix
  • New feature
  • Documentation
  • Refactor / internal

Overview

This update automatically signs all commits using the generated ssh key so users get the verified badge without touching global config (closes #71). It also includes a massive codebase cleanup to remove repeated code, standardize git stash operations, and fix edge cases across all commands based on the refactor plan.

Changes

Feature: Auto SSH Signing

  • manager.py: updated login flow to tell users to paste their key twice on github (for auth and signing).
  • git_operations.py: injected temporary -c gpg.format=ssh and -c user.signingkey flags into the commit command to sign automatically on the fly.

Refactor: Codebase Cleanup

  • stash_operation.py: extracted all stash commands into a shared api that returns booleans. updated jump.py and state.py to use it.
  • executor.py: added command_failed() helper so we dont leak subprocess error handling into every file.
  • ssh_utils.py: extracted _get_github_ssh_response() to prevent running the same ssh test twice. replaced risky os.system calls with webbrowser and safe subprocess calls for opening settings.
  • state.py: fixed logic to only call git stash list once per operation to improve speed.
  • cleanups: removed unused sys imports, fixed bare except blocks, fixed wildcard imports, and consolidated error imports across all files.

How to Test

  1. pip install -e ".[dev]"
  2. run pytest to make sure all 146 tests still pass.
  3. run gitgo user login and follow the new instructions to add the signing key to your github account.
  4. make a change and run gitgo push on a test repository.
  5. Expected result: your commit shows up on github with the green verified badge and all commands work normally without crashing.

Checklist

  • I tested my changes locally and they work
  • I updated CHANGELOG.md under the [Unreleased] section
  • I updated README.md (if I added or changed a command)
  • I added or updated tests for my change (if applicable)
  • My change does not break any existing commands

@Huerte Huerte merged commit 48a5210 into main May 30, 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.

[FEATURE] Make commit signing automatic using the generated SSH key

1 participant