Skip to content

feat(cli): Add SSH key upload options to CLI#21

Merged
higherbros merged 3 commits intomainfrom
juncen/upload-key-from-gh-cli
Feb 3, 2026
Merged

feat(cli): Add SSH key upload options to CLI#21
higherbros merged 3 commits intomainfrom
juncen/upload-key-from-gh-cli

Conversation

@higherbros
Copy link
Owner

Introduce options for uploading SSH keys to GitHub via the GitHub CLI, enhancing user experience.
Enable ESLint checks for conditionals and spreads in the no-misused-promises rule.

Copilot AI review requested due to automatic review settings February 3, 2026 14:14
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds SSH key upload functionality via the GitHub CLI (gh) to the gh-ssh tool, allowing users to automatically upload their SSH keys to GitHub instead of manually copying and pasting them. The PR also enables stricter ESLint checks for promises in conditionals and spreads.

Changes:

  • Added new CLI options: --upload, --skip-upload, and --key-title for controlling SSH key upload behavior
  • Implemented GitHub CLI service functions for checking installation, authentication, and uploading SSH keys
  • Enhanced the workflow to support automated SSH key upload with authentication handling and fallback to manual upload
  • Enabled ESLint checksConditionals and checksSpreads rules for the no-misused-promises rule

Reviewed changes

Copilot reviewed 10 out of 11 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
tests/help.test.ts Added test assertions for new CLI options in help text
tests/gh.test.ts Added comprehensive tests for new GitHub CLI service functions
tests/args.test.ts Added tests for parsing new CLI arguments including edge case handling
src/lib/services/gh.ts New service module for GitHub CLI operations (installation check, authentication, key upload)
src/lib/cli/workflow.ts Enhanced step 6 to support automated SSH key upload with authentication flow and fallback handling
src/lib/cli/types.ts Added new optional properties for upload-related CLI options
src/lib/cli/help.ts Added documentation for new CLI options
src/lib/cli/args.ts Added parsing logic for new CLI arguments
package-lock.json Updated lockfile format with peer dependency markers (appears to be from npm version update)
eslint.config.mjs Enabled additional promise checking rules and added config for disabling type-checked rules on JS files
README.md Updated documentation to reflect new upload options and improved step 6 description

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@higherbros higherbros merged commit f1b5081 into main Feb 3, 2026
8 checks passed
@higherbros higherbros deleted the juncen/upload-key-from-gh-cli branch February 3, 2026 14:30
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