Skip to content

fix(keys): reject invalid keys-add arguments - #1279

Open
WilliamK112 wants to merge 1 commit into
Scalingo:masterfrom
WilliamK112:fix/keys-add-arguments-1227
Open

WilliamK112 wants to merge 1 commit into
Scalingo:masterfrom
WilliamK112:fix/keys-add-arguments-1227

Conversation

@WilliamK112

Copy link
Copy Markdown
Contributor

Summary

  • show the keys-add command help when its argument count is invalid
  • return a clear error so missing or extra arguments produce a non-zero exit status
  • cover missing and extra argument cases with command-level tests

Fixes #1227.

Validation

  • go test ./...
  • go test -race ./cmd
  • go vet ./...
  • DISABLE_UPDATE_CHECKER=true go run ./scalingo keys-add key-name (verified help/error output and exit status 1)
  • git diff --check

AI assistance disclosure

This contribution was implemented with AI assistance. I reviewed the diff and ran the validation listed above locally.

  • Add a changelog entry in the section "To Be Released" of CHANGELOG.md

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 28, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ⚠️ Failed 2026-10-28T23:01:51.033614Z
We couldn’t complete this review. Comment @codex review to try again.
222db72 Manual request
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@WilliamK112

Copy link
Copy Markdown
Contributor Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Something went wrong. Try again later by commenting “@codex review”.

An unknown error occurred
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@WilliamK112
WilliamK112 force-pushed the fix/keys-add-arguments-1227 branch from 222db72 to 0ae1c85 Compare October 30, 2026 15:57

This branch has not been deployed

No deployments
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.

[SSH Keys] keys-add doesn't display an error when an argument is missing

1 participant