feat: auto ssh signing and codebase refactor#73
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Type
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=sshand-c user.signingkeyflags 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. updatedjump.pyandstate.pyto use it.executor.py: addedcommand_failed()helper so we dont leaksubprocesserror handling into every file.ssh_utils.py: extracted_get_github_ssh_response()to prevent running the same ssh test twice. replaced riskyos.systemcalls withwebbrowserand safe subprocess calls for opening settings.state.py: fixed logic to only callgit stash listonce per operation to improve speed.sysimports, fixed bareexceptblocks, fixed wildcard imports, and consolidated error imports across all files.How to Test
pip install -e ".[dev]"pytestto make sure all 146 tests still pass.gitgo user loginand follow the new instructions to add the signing key to your github account.gitgo pushon a test repository.Checklist
CHANGELOG.mdunder the[Unreleased]sectionREADME.md(if I added or changed a command)