1
0
mirror of synced 2026-02-01 12:01:41 -05:00

Merge branch 'main' into cschleiden/typed-inputs

This commit is contained in:
Christopher Schleiden
2022-01-11 14:36:10 -08:00
committed by GitHub
19 changed files with 29 additions and 71 deletions

View File

@@ -73,4 +73,4 @@ jobs:
run: npm run build
- name: Run tests
run: npm run test tests/${{ matrix.test-group }}/
run: npm test -- tests/${{ matrix.test-group }}/

View File

@@ -93,4 +93,4 @@ jobs:
- name: Run tests
env:
DIFF_FILE: get_diff_files.txt
run: npm run test tests/${{ matrix.test-group }}/
run: npm test -- tests/${{ matrix.test-group }}/

View File

@@ -32,7 +32,7 @@ export const TableOfContents = (props: Props) => {
renderItem: () => (
<ActionList.Item>
<li key={href} className="f4 d-list-item width-full list-style-none">
<Link className="d-block width-full" href={href}>
<Link className="d-block width-full text-underline" href={href}>
{title}
</Link>
{(childTocItems || []).length > 0 && (
@@ -49,7 +49,10 @@ export const TableOfContents = (props: Props) => {
}
return (
<li key={childItem.fullPath} className="f4 d-block width-full m-2">
<Link className="d-block width-full" href={childItem.fullPath}>
<Link
className="d-block width-full text-underline"
href={childItem.fullPath}
>
{childItem.title}
</Link>
</li>

View File

@@ -31,8 +31,6 @@ You can also disable and enable a workflow using the REST API. For more informat
## Disabling a workflow
{% include tool-switcher %}
{% webui %}
{% data reusables.repositories.navigate-to-repo %}
@@ -62,8 +60,6 @@ gh workflow disable <em>workflow</em>
## Enabling a workflow
{% include tool-switcher %}
{% webui %}
You can re-enable a workflow that was previously disabled.

View File

@@ -16,8 +16,6 @@ By default, {% data variables.product.product_name %} stores build logs and arti
{% data reusables.repositories.permissions-statement-read %}
{% include tool-switcher %}
{% webui %}
{% data reusables.repositories.navigate-to-repo %}

View File

@@ -20,8 +20,6 @@ To run a workflow manually, the workflow must be configured to run on the `workf
## Running a workflow
{% include tool-switcher %}
{% webui %}
{% data reusables.repositories.navigate-to-repo %}

View File

@@ -17,9 +17,7 @@ versions:
## Re-running all the jobs in a workflow
Re-running a workflow uses the same `GITHUB_SHA` (commit SHA) and `GITHUB_REF` (Git ref) of the original event that triggered the workflow run. You can re-run a workflow for up to 30 days after the initial run.
{% include tool-switcher %}
Re-running a workflow uses the same `GITHUB_SHA` (commit SHA) and `GITHUB_REF` (Git ref) of the original event that triggered the workflow run. You can re-run a workflow for up to 30 days after the initial run.
{% webui %}

View File

@@ -16,8 +16,6 @@ shortTitle: View workflow run history
{% data reusables.repositories.permissions-statement-read %}
{% include tool-switcher %}
{% webui %}
{% data reusables.repositories.navigate-to-repo %}

View File

@@ -41,7 +41,7 @@ For secrets stored at the environment level, you can enable required reviewers t
{% data reusables.codespaces.secrets-naming %}
For example, {% ifversion fpt or ghes > 3.0 or ghae or ghec %}a secret created at the environment level must have a unique name in that environment, {% endif %}a secret created at the repository level must have a unique name in that repository, and a secret created at the organization level must have a unique name at that level.
For example, {% ifversion fpt or ghes > 3.0 or ghae or ghec %}a secret created at the environment level must have a unique name in that environment, {% endif %}a secret created at the repository level must have a unique name in that repository, and a secret created at the organization level must have a unique name at that level.
{% data reusables.codespaces.secret-precedence %}{% ifversion fpt or ghes > 3.0 or ghae or ghec %} Similarly, if an organization, repository, and environment all have a secret with the same name, the environment-level secret takes precedence.{% endif %}
@@ -79,8 +79,6 @@ When generating credentials, we recommend that you grant the minimum permissions
{% data reusables.github-actions.permissions-statement-secrets-repository %}
{% include tool-switcher %}
{% webui %}
{% data reusables.repositories.navigate-to-repo %}
@@ -121,8 +119,6 @@ To list all secrets for the repository, use the `gh secret list` subcommand.
{% data reusables.github-actions.permissions-statement-secrets-environment %}
{% include tool-switcher %}
{% webui %}
{% data reusables.repositories.navigate-to-repo %}
@@ -160,8 +156,6 @@ When creating a secret in an organization, you can use a policy to limit which r
{% data reusables.github-actions.permissions-statement-secrets-organization %}
{% include tool-switcher %}
{% webui %}
{% data reusables.organizations.navigate-to-org %}

View File

@@ -24,7 +24,6 @@ After adding a new SSH key to your account on {% ifversion ghae %}{% data variab
{% mac %}
{% include tool-switcher %}
{% webui %}
1. Copy the SSH public key to your clipboard.
@@ -59,8 +58,6 @@ After adding a new SSH key to your account on {% ifversion ghae %}{% data variab
{% windows %}
{% include tool-switcher %}
{% webui %}
1. Copy the SSH public key to your clipboard.
@@ -96,7 +93,6 @@ After adding a new SSH key to your account on {% ifversion ghae %}{% data variab
{% linux %}
{% include tool-switcher %}
{% webui %}
1. Copy the SSH public key to your clipboard.
@@ -114,7 +110,7 @@ After adding a new SSH key to your account on {% ifversion ghae %}{% data variab
**Tip:** Alternatively, you can locate the hidden `.ssh` folder, open the file in your favorite text editor, and copy it to your clipboard.
{% endtip %}
{% data reusables.user_settings.access_settings %}
{% data reusables.user_settings.ssh %}
4. Click **New SSH key** or **Add SSH key**.

View File

@@ -18,8 +18,6 @@ A codespace will stop running after a period of inactivity. You can specify the
{% endwarning %}
{% include tool-switcher %}
{% webui %}
## Setting your default timeout

View File

@@ -67,8 +67,6 @@ If you would like to create a codespace for a repository owned by your personal
## Creating a codespace
{% include tool-switcher %}
{% webui %}
{% data reusables.repositories.navigate-to-repo %}

View File

@@ -16,7 +16,7 @@ topics:
shortTitle: Delete a codespace
---
{% data reusables.codespaces.concurrent-codespace-limit %}
@@ -26,8 +26,7 @@ shortTitle: Delete a codespace
{% endnote %}
{% include tool-switcher %}
{% webui %}
1. Navigate to the "Your Codespaces" page at [github.com/codespaces](https://github.com/codespaces).
@@ -37,13 +36,13 @@ shortTitle: Delete a codespace
![Delete button](/assets/images/help/codespaces/delete-codespace.png)
{% endwebui %}
{% vscode %}
{% data reusables.codespaces.deleting-a-codespace-in-vscode %}
{% endvscode %}
{% cli %}

View File

@@ -17,7 +17,7 @@ shortTitle: Forward ports
## About forwarded ports
Port forwarding gives you access to TCP ports running within your codespace. For example, if you're running a web application on a particular port in your codespace, you can forward that port. This allows you to access the application from the browser on your local machine for testing and debugging.
Port forwarding gives you access to TCP ports running within your codespace. For example, if you're running a web application on a particular port in your codespace, you can forward that port. This allows you to access the application from the browser on your local machine for testing and debugging.
When an application running inside a codespace prints output to the terminal that contains a localhost URL, such as `http://localhost:PORT` or `http://127.0.0.1:PORT`, the port is automatically forwarded. If you're using {% data variables.product.prodname_codespaces %} in the browser or in {% data variables.product.prodname_vscode %}, the URL string in the terminal is converted into a link that you can click to view the web page on your local machine. By default, {% data variables.product.prodname_codespaces %} forwards ports using HTTP.
@@ -29,8 +29,6 @@ You can also forward a port manually, label forwarded ports, share forwarded por
You can manually forward a port that wasn't forwarded automatically.
{% include tool-switcher %}
{% webui %}
{% data reusables.codespaces.navigate-to-ports-tab %}
@@ -47,12 +45,12 @@ You can manually forward a port that wasn't forwarded automatically.
By default, {% data variables.product.prodname_codespaces %} forwards ports using HTTP but you can update any port to use HTTPS, as needed.
{% data reusables.codespaces.navigate-to-ports-tab %}
1. Right click the port you want to update, then hover over **Change Port Protocol**.
1. Right click the port you want to update, then hover over **Change Port Protocol**.
![Option to change port protocol](/assets/images/help/codespaces/update-port-protocol.png)
1. Select the protocol needed for this port. The protocol that you select will be remembered for this port for the lifetime of the codespace.
{% endwebui %}
{% vscode %}
{% data reusables.codespaces.navigate-to-ports-tab %}
@@ -65,7 +63,7 @@ By default, {% data variables.product.prodname_codespaces %} forwards ports usin
![Text box to type port button](/assets/images/help/codespaces/port-number-text-box.png)
{% endvscode %}
{% cli %}
@@ -74,7 +72,7 @@ By default, {% data variables.product.prodname_codespaces %} forwards ports usin
To forward a port use the `gh codespace ports forward` subcommand. Replace `codespace-port:local-port` with the remote and local ports that you want to connect. After entering the command choose from the list of codespaces that's displayed.
```shell
gh codespace ports forward <em>codespace-port</em>:<em>local-port</em>
gh codespace ports forward <em>codespace-port</em>:<em>local-port</em>
```
For more information about this command, see [the {% data variables.product.prodname_cli %} manual](https://cli.github.com/manual/gh_codespace_ports_forward).
@@ -93,8 +91,6 @@ To see details of forwarded ports enter `gh codespace ports` and then choose a c
If you want to share a forwarded port with others, you can either make the port private to your organization or make the port public. After you make a port private to your organization, anyone in the organization with the port's URL can view the running application. After you make a port public, anyone who knows the URL and port number can view the running application without needing to authenticate.
{% include tool-switcher %}
{% webui %}
{% data reusables.codespaces.navigate-to-ports-tab %}
@@ -105,7 +101,7 @@ If you want to share a forwarded port with others, you can either make the port
1. Send the copied URL to the person you want to share the port with.
{% endwebui %}
{% vscode %}
{% data reusables.codespaces.navigate-to-ports-tab %}
@@ -116,7 +112,7 @@ If you want to share a forwarded port with others, you can either make the port
1. Send the copied URL to the person you want to share the port with.
{% endvscode %}
{% cli %}
To change the visibility of a forwarded port, use the `gh codespace ports visibility` subcommand. {% data reusables.codespaces.port-visibility-settings %}
@@ -124,7 +120,7 @@ To change the visibility of a forwarded port, use the `gh codespace ports visibi
Replace `codespace-port` with the forwarded port number. Replace `setting` with `private`, `org`, or `public`. After entering the command choose from the list of codespaces that's displayed.
```shell
gh codespace ports visibility <em>codespace-port</em>:<em>setting</em>
gh codespace ports visibility <em>codespace-port</em>:<em>setting</em>
```
You can set the visibility for multiple ports with one command. For example:

View File

@@ -23,8 +23,6 @@ Information on {% data variables.product.prodname_codespaces %} is output to thr
These logs contain detailed information about the codespace, the container, the session, and the {% data variables.product.prodname_vscode %} environment. They are useful for diagnosing connection issues and other unexpected behavior. For example, the codespace freezes but the "Reload Windows" option unfreezes it for a few minutes, or you are randomly disconnected from the codespace but able to reconnect immediately.
{% include tool-switcher %}
{% webui %}
1. If you are using {% data variables.product.prodname_codespaces %} in the browser, ensure that you are connected to the codespace you want to debug.
@@ -33,7 +31,7 @@ These logs contain detailed information about the codespace, the container, the
1. If you are using {% data variables.product.prodname_codespaces %} in the browser, right-click on the zip archive of logs from the Explorer view and select **Download…** to download them to your local machine.
{% endwebui %}
{% vscode %}
1. Open the {% data variables.product.prodname_vscode %} Command Palette (`Shift + Command + P` (Mac) / `Ctrl + Shift + P` (Windows)) and type **Export logs**. Select **Codespaces: Export Logs** from the list to download the logs.
@@ -51,8 +49,7 @@ Currently you can't use {% data variables.product.prodname_cli %} to access thes
These logs contain information about the container, dev container, and their configuration. They are useful for debugging configuration and setup problems.
{% include tool-switcher %}
{% webui %}
1. Connect to the codespace you want to debug.
@@ -61,7 +58,7 @@ These logs contain information about the container, dev container, and their con
If you want to share the log with support, you can copy the text from the creation log into a text editor and save the file locally.
{% endwebui %}
{% vscode %}
Open the Command Palette (`Shift + Command + P` (Mac) / `Ctrl + Shift + P` (Windows)) and type **Creation logs**. Select **Codespaces: View Creation Log** from the list to open the `creation.log` file.
@@ -77,7 +74,7 @@ If you want to share the log with support, you can copy the text from the creati
To see the creation log use the `gh codespace logs` subcommand. After entering the command choose from the list of codespaces that's displayed.
```shell
gh codespace logs
gh codespace logs
```
For more information about this command, see [the {% data variables.product.prodname_cli %} manual](https://cli.github.com/manual/gh_codespace_logs).
@@ -95,7 +92,7 @@ gh codespace logs -c <CODESPACE-NAME> > /path/to/logs.txt
These logs are available for {% data variables.product.prodname_vscode %} desktop users only. They are useful if it seems like the {% data variables.product.prodname_codespaces %} extension or {% data variables.product.prodname_vscode %} editor are having issues that prevent creation or connection.
1. In {% data variables.product.prodname_vscode %}, open the Command Palette.
1. Type **Logs** and select **Developer: Open Extension Logs Folder** from the list to open the extension log folder in your system's file explorer.
1. Type **Logs** and select **Developer: Open Extension Logs Folder** from the list to open the extension log folder in your system's file explorer.
From this view, you can access logs generated by the various extensions that you use in {% data variables.product.prodname_vscode %}. You will see logs for GitHub Codespaces, GitHub Authentication, and Git, in addition to any other extensions you have enabled.

View File

@@ -35,7 +35,6 @@ You've successfully forked the Spoon-Knife repository, but so far, it only exist
You can clone your fork with the command line, {% data variables.product.prodname_cli %}, or {% data variables.product.prodname_desktop %}.
{% include tool-switcher %}
{% webui %}
1. On {% data variables.product.product_name %}, navigate to **your fork** of the Spoon-Knife repository.
@@ -87,7 +86,6 @@ Go ahead and make a few changes to the project using your favorite text editor,
When you're ready to submit your changes, stage and commit your changes. `git add .` tells Git that you want to include all of your changes in the next commit. `git commit` takes a snapshot of those changes.
{% include tool-switcher %}
{% webui %}
```shell
@@ -116,7 +114,6 @@ When you stage and commit files, you essentially tell Git, "Okay, take a snapsho
Right now, your changes only exist locally. When you're ready to push your changes up to {% data variables.product.product_name %}, push your changes to the remote.
{% include tool-switcher %}
{% webui %}
```shell

View File

@@ -39,8 +39,6 @@ You can store a variety of projects in {% data variables.product.product_name %}
{% endif %}
{% include tool-switcher %}
{% webui %}
{% data reusables.repositories.create_new %}
@@ -69,8 +67,6 @@ Congratulations! You've successfully created your first repository, and initiali
## Commit your first change
{% include tool-switcher %}
{% webui %}
A *[commit](/articles/github-glossary#commit)* is like a snapshot of all the files in your project at a particular point in time.

View File

@@ -4,11 +4,7 @@ import patterns from './patterns.js'
export default function getLiquidDataReferences(text) {
return (text.match(patterns.dataReference) || []).map((ref) => {
const cleaned = ref
.replace(/\.\.\//g, '')
.replace('{% data', '')
.replace('%}', '')
.trim()
const cleaned = ref.replace(/\.+\//g, '').replace('{% data', '').replace('%}', '').trim()
return `site.data.${cleaned}`
})

View File

@@ -16,7 +16,7 @@ export const enterpriseHomepage = /\/enterprise\/?(\d+\.\d+)?$/
export const desktop = /desktop\//
export const oldGuidesPath = /(\/admin|(^|\/)desktop)\/guides/
// need to capture 11.10.340 and 2.0+
export const getEnterpriseVersionNumber = /^.*?enterprise\/(\d+\.\d+(?:\.340)?).*?$/
export const getEnterpriseVersionNumber = /enterprise\/(\d+\.\d+(?:\.340)?)/
export const removeEnterpriseVersion = /(enterprise\/)\d+\.\d+\//
export const guides = /guides\//
export const hasLanguageCode = /^\/[a-z]{2}(\/|$|\?)/