Skip to content

Allow setting display name on codespace create #6549

Description

@mgabeler-lee-6rs

Describe the feature or problem you’d like to solve

I'd like to be able to set the display name for a codespace when I create it, so that I don't have to immediately edit it after creating it.

Proposed solution

Add -d/--display-name argument to gh cs create same as it exists on gh cs edit to safe time

Additional context

N/A

Activity

  1. added and removed on Nov 7, 2022
  2. despreston commented on Nov 18, 2022

    @despreston
    Contributor

    Took a look at this and I believe there's a bug in the POST /user/codespaces endpoint. It seems to be ignoring display_name.

    gh api \
      --method POST \
      -H "Accept: application/vnd.github+json" \
      /user/codespaces \
      -F repository_id=384471828 \
     -f ref='trunk' \
     -f display_name='hello'

    ... was my test request with my own repo.

  3. luanzeba commented on Nov 22, 2022

    @luanzeba
    Contributor

    I noticed the same behavior as @despreston and confirmed that's a shortcoming in the API. This seems like a bug since the API docs for codespace creation list display_name as an optional param so I opened an issue for the codespaces team

  4. despreston commented on Dec 2, 2022

    @despreston
    Contributor

    @luanzeba Thx. If you can respond here when that's fixed I can resume work on this 👍

  5. andrewlazenka commented on Dec 14, 2022

    @andrewlazenka

    👋 @despreston We shipped a fix for this today! The gh api snippet you shared should work as expected.

  6. despreston commented on Dec 14, 2022

    @despreston
    Contributor
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions