1
0
mirror of synced 2026-01-08 12:01:53 -05:00

Merge pull request #32210 from github/jules-new-8018

[2022-11-09 Universe]: Change codespace display name in GUI and new permanent name generation method
This commit is contained in:
Jules
2022-11-04 11:00:05 +01:00
committed by GitHub
6 changed files with 34 additions and 12 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 117 KiB

After

Width:  |  Height:  |  Size: 57 KiB

View File

@@ -41,7 +41,7 @@ For information on choosing a machine type when you create a codespace, see "[Cr
!['Your codespaces' list](/assets/images/help/codespaces/your-codespaces-list.png)
1. Click the ellipsis (**...**) to the right of the codespace you want to modify.
{% data reusables.codespaces.ellipsis-settings %}
1. Click **Change machine type**.
!['Change machine type' menu option](/assets/images/help/codespaces/change-machine-type-menu-option.png)
@@ -73,7 +73,7 @@ You can use the `gh codespace edit --machine MACHINE-TYPE-NAME` {% data variable
gh api /user/codespaces/CODESPACE-NAME
```
Replace `CODESPACE-NAME` with the permanent name of the codespace, for example `octocat-myrepo-gmc7`. The permanent names are listed under the **NAME** column in the list returned by `gh codespace list`.
Replace `CODESPACE-NAME` with the permanent name of the codespace, for example `octocat-literate-space-parakeet-mld5`. The permanent names are listed under the **NAME** column in the list returned by `gh codespace list`.
If you're prompted to request the `codespace` scope, follow the instructions in the terminal.
@@ -84,7 +84,7 @@ You can use the `gh codespace edit --machine MACHINE-TYPE-NAME` {% data variable
gh api /user/codespaces/CODESPACE-NAME/machines
```
Replace `CODESPACE-NAME` with the permanent name of the codespace, for example `octocat-myrepo-gmc7`.
Replace `CODESPACE-NAME` with the permanent name of the codespace, for example `octocat-literate-space-parakeet-mld5`.
1. To change the machine type for a codespace, enter the following command.
```

View File

@@ -1,6 +1,6 @@
---
title: Renaming a codespace
intro: 'You can use the {% data variables.product.prodname_cli %} to change the codespace display name to one of your choice.'
intro: 'You can change the codespace display name to one of your choice through {% data variables.product.prodname_dotcom_the_website %} or the {% data variables.product.prodname_cli %}.'
product: '{% data reusables.gated-features.codespaces %}'
versions:
fpt: '*'
@@ -32,11 +32,11 @@ To find the display name of a codespace:
### Permanent codespace names
In addition to the display name, when you create a codespace, a permanent name is also assigned to the codespace. The name is a combination of your {% data variables.product.company_short %} handle, the repository name, and some random characters. For example: `octocat-myrepo-gmc7`. You can't change this name.
In addition to the display name, when you create a codespace, a permanent name is also assigned to the codespace. The name is a combination of your {% data variables.product.company_short %} handle, and the auto-generated display name. For example: `octocat-literate-space-parakeet-mld5`. You can't change the permanent name.
To find the permanent name of a codespace:
* On {% data variables.product.product_name %}, the permanent name is shown in a pop-up when you hover over the **Open in browser** option on https://github.com/codespaces.
* On {% data variables.product.product_name %}, the permanent name is shown in a pop-up when you hover over the display name of a codespace on https://github.com/codespaces.
![Screenshot of the codespace name shown on hover over](/assets/images/help/codespaces/find-codespace-name-github.png)
@@ -45,7 +45,11 @@ To find the permanent name of a codespace:
## Renaming a codespace
Changing the display name of a codespace can be useful if you have multiple codespaces that you will be using for an extended period. An appropriate name helps you identify a codespace that you use for a particular purpose. You can change the display name for your codespace by using the {% data variables.product.prodname_cli %}.
Changing the display name of a codespace can be useful if you have multiple codespaces that you will be using for an extended period. An appropriate name helps you identify a codespace that you use for a particular purpose.
{% cli %}
You can change the display name for your codespace by using the {% data variables.product.prodname_cli %}.
To rename a codespace, use the `gh codespace edit` subcommand:
@@ -56,3 +60,20 @@ gh codespace edit -c PERMANENT-CODESPACE-NAME -d NEW-DISPLAY-NAME
In this example, replace `PERMANENT-CODESPACE-NAME` with the permanent name of the codespace whose display name you want to change. Replace `NEW-DISPLAY-NAME` with the display name you want to use for this codespace.
For more information, see "[Using {% data variables.product.prodname_github_codespaces %} with {% data variables.product.prodname_cli %}](/codespaces/developing-in-codespaces/using-github-codespaces-with-github-cli#rename-a-codespace)."
{% endcli %}
{% webui %}
You can change the display name for your codespace on {% data variables.product.prodname_dotcom_the_website %}.
{% data reusables.codespaces.your-codespaces-procedure-step %}
The current display name for each of your codespaces is displayed.
{% data reusables.codespaces.ellipsis-settings %}
1. Click **Rename**.
1. In the prompt, under "Change display name to..." type your desired display name and click **OK**.
{% endwebui %}

View File

@@ -27,7 +27,7 @@ topics:
| Environment variable | Description |
| ---------------------|------------ |
| `CODESPACE_NAME` | The name of the codespace For example, `monalisa-github-hello-world-2f2fsdf2e` |
| `CODESPACE_NAME` | The name of the codespace For example, `octocat-literate-space-parakeet-mld5` |
| `CODESPACES` | Always `true` while in a codespace |
| `GIT_COMMITTER_EMAIL` | The email for the "author" field of future `git` commits. |
| `GIT_COMMITTER_NAME` | The name for the "committer" field of future `git` commits. |

View File

@@ -13,16 +13,16 @@ redirect_from:
- /codespaces/troubleshooting/working-with-support-for-codespaces
---
Before support can help you with problems with codespaces, you need to know the name of the codespace and its codespaces ID (identifier). In addition, support may ask you to share some logs with them. For more information, see "[{% data variables.product.prodname_github_codespaces %} logs](/codespaces/troubleshooting/github-codespaces-logs)" and "[About GitHub Support](/github/working-with-github-support/about-github-support)."
Before support can help you with problems with codespaces, you need to know the permanent name of the codespace and its codespaces ID (identifier). In addition, support may ask you to share some logs with them. For more information, see "[{% data variables.product.prodname_github_codespaces %} logs](/codespaces/troubleshooting/github-codespaces-logs)" and "[About GitHub Support](/github/working-with-github-support/about-github-support)."
## Codespace names
Each codespace has a unique name that is a combination of your {% data variables.product.company_short %} handle, the repository name, and some random characters. The additional characters allow you to have codespaces for different branches in the same repository. For example: `octocat-myrepo-gmc7`.
Each codespace has a unique name that is a combination of your {% data variables.product.company_short %} handle, two or three automatically generated words, and some random characters. For example: `octocat-literate-space-parakeet-mld5`. The two or three automatically generated words also form the initial display name of your codespace, in this case, `literate-space-parakeet`. You can change the display name for a codespace, but this will not affect the permanent name. For more information, see "[Renaming a codespace](/codespaces/customizing-your-codespace/renaming-a-codespace)."
To find the name of a codespace:
- Open the codespace in the browser. The subdomain of the URL is the name of the codespace. For example: `https://octocat-myrepo-gmc7.github.dev` is the URL for the `octocat-myrepo-gmc7` codespace.
- If you cannot open a codespace, you can access the name in {% data variables.product.product_name %} on https://github.com/codespaces. The name is shown in a pop-up when you hover over the **Open in browser** option on https://github.com/codespaces.
- Open the codespace in the browser. The subdomain of the URL is the name of the codespace. For example: `https://octocat-literate-space-parakeet-mld5.github.dev` is the URL for the `octocat-literate-space-parakeet-mld5` codespace.
- If you cannot open a codespace, you can access the name in {% data variables.product.product_name %} on https://github.com/codespaces. The name is shown in a pop-up when you hover over the display name of a codespace on https://github.com/codespaces.
![Codespace name shown on hover over](/assets/images/help/codespaces/find-codespace-name-github.png)
The name the codespace is also included in many of the log files. For example, in the codespace logs as the value of `friendlyName`, in the {% data variables.product.prodname_github_codespaces %} extension log after `making GET request for`, and in the browser console log after `clientUrl`. For more information, see "[{% data variables.product.prodname_github_codespaces %} logs](/codespaces/troubleshooting/github-codespaces-logs)."

View File

@@ -0,0 +1 @@
1. Click the ellipsis (**...**) to the right of the codespace you want to modify.