-
Notifications
You must be signed in to change notification settings - Fork 7.8k
Closed
Labels
bugSomething isn't workingSomething isn't workingdocsgh-codespacerelating to the gh codespace commandrelating to the gh codespace commandhelp wantedContributions welcomeContributions welcomep3Affects a small number of users or is largely cosmeticAffects a small number of users or is largely cosmetic
Description
Describe the bug
gh codespace create accepts --display-name option that must be up to 48 characters, but the help message doesn't tell it. Manual as well.
If I specify too long display name, it displays error message:
error creating codespace: HTTP 400: Display name must be 48 characters or less (https://api.github.com/user/codespaces)
However on other environment it displays generic 500 error message:
error creating codespace: HTTP 500 (https://api.github.com/user/codespaces)
I couldn't replicate the 500 error but my customer reported it and have experienced it many times. They ran gh command on GitHub Actions workflow.
Regardless if 500 was unexpected/intermittent response from creating Codespaces API endpoint, if the help message and manual explains the limit, it will reduces confusion.
Steps to reproduce the behavior
OK:
gh cs create --repo OWNER/REPO --machine basicLinux32gb --location SouthEastAsia --display-name this-is-the-long-display-name-with-48-characters
NOT OK:
gh cs create --repo OWNER/REPO --machine basicLinux32gb --location SouthEastAsia --display-name this-is-very-long-display-name-with-49-characters
Please replace --repo OWNER/REPO accordingly.
Expected vs actual behavior
Expected:
$ gh cs create -h
(snip)
-d, --display-name string display name for the codespace (48 characters or less)
Logs
samcoe
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingdocsgh-codespacerelating to the gh codespace commandrelating to the gh codespace commandhelp wantedContributions welcomeContributions welcomep3Affects a small number of users or is largely cosmeticAffects a small number of users or is largely cosmetic