1
0
mirror of synced 2025-12-19 18:10:59 -05:00

Fix inconsistent alerts by using the markdown notation - part 2 (#35221)

Co-authored-by: Alex Nguyen <150945400+nguyenalex836@users.noreply.github.com>
This commit is contained in:
Artur Kordowski
2024-11-08 18:20:31 +01:00
committed by GitHub
parent 0208d54f08
commit b1a68cb155
292 changed files with 1230 additions and 2749 deletions

View File

@@ -15,19 +15,13 @@ topics:
You need a repository for each extension that you create. The repository name must start with `gh-`. The rest of the repository name is the name of the extension. The repository must have an executable file at its root with the same name as the repository or a set of precompiled binary executables attached to a release.
{% note %}
**Note**: When relying on an executable script, we recommend using a bash script because bash is a widely available interpreter. You may use non-bash scripts, but the user must have the necessary interpreter installed in order to use the extension. If you would prefer to not rely on users having interpreters installed, consider a precompiled extension.
{% endnote %}
> [!NOTE]
> When relying on an executable script, we recommend using a bash script because bash is a widely available interpreter. You may use non-bash scripts, but the user must have the necessary interpreter installed in order to use the extension. If you would prefer to not rely on users having interpreters installed, consider a precompiled extension.
## Creating an interpreted extension with `gh extension create`
{% note %}
**Note**: Running `gh extension create` with no arguments will start an interactive wizard.
{% endnote %}
> [!NOTE]
> Running `gh extension create` with no arguments will start an interactive wizard.
You can use the `gh extension create` command to create a project for your extension, including a bash script that contains some starter code.
@@ -73,11 +67,8 @@ You can use the `--precompiled=other` argument to create a project for your non-
1. In the directory that you created, add an executable file with the same name as the directory.
{% note %}
**Note:** Make sure that your file is executable. On Unix, you can execute `chmod +x file_name` in the command line to make `file_name` executable. On Windows, you can run `git init -b main`, `git add file_name`, then `git update-index --chmod=+x file_name`.
{% endnote %}
> [!NOTE]
> Make sure that your file is executable. On Unix, you can execute `chmod +x file_name` in the command line to make `file_name` executable. On Windows, you can run `git init -b main`, `git add file_name`, then `git update-index --chmod=+x file_name`.
1. Write your script in the executable file. For example:
@@ -229,11 +220,8 @@ For more information, see [`gh help formatting`](https://cli.github.com/manual/g
1. From your directory, create a repository to publish your extension. Replace `EXTENSION-NAME` with the name of your extension.
{% note %}
**Note:** Be careful not to commit the binary produced by your compilation step to version control.
{% endnote %}
> [!NOTE]
> Be careful not to commit the binary produced by your compilation step to version control.
```shell
git init -b main
@@ -246,11 +234,8 @@ For more information, see [`gh help formatting`](https://cli.github.com/manual/g
For example, an extension named `whoami` compiled for Windows 64bit would have the name `gh-whoami-windows-amd64.exe` while the same extension compiled for Linux 32bit would have the name `gh-whoami-linux-386`. To see an exhaustive list of OS and architecture combinations recognized by `gh`, see [this source code](https://github.com/cli/cli/blob/14f704fd0da58cc01413ee4ba16f13f27e33d15e/pkg/cmd/extension/manager.go#L696).
{% note %}
**Note:** For your extension to run properly on Windows, its asset file must have a `.exe` extension. No extension is needed for other operating systems.
{% endnote %}
> [!NOTE]
> For your extension to run properly on Windows, its asset file must have a `.exe` extension. No extension is needed for other operating systems.
Releases can be created from the command line. For example:

View File

@@ -22,11 +22,8 @@ shortTitle: Quickstart
## Some useful commands
{% note %}
**Note**: When you use some commands for the first time - for example, `gh codespace SUBCOMMAND` - you'll be prompted to add extra scopes to your authentication token. Follow the onscreen instructions.
{% endnote %}
> [!NOTE]
> When you use some commands for the first time - for example, `gh codespace SUBCOMMAND` - you'll be prompted to add extra scopes to your authentication token. Follow the onscreen instructions.
### Viewing your status

View File

@@ -11,11 +11,8 @@ topics:
## About {% data variables.product.prodname_cli %} extensions
{% note %}
**Note:** Extensions outside of {% data variables.product.product_name %} and {% data variables.product.prodname_cli %} are not certified by {% data variables.product.product_name %} and are governed by separate terms of service, privacy policy, and support documentation. To mitigate risk when using third-party extensions, audit the source code of the extension before installing or updating the extension.
{% endnote %}
> [!NOTE]
> Extensions outside of {% data variables.product.product_name %} and {% data variables.product.prodname_cli %} are not certified by {% data variables.product.product_name %} and are governed by separate terms of service, privacy policy, and support documentation. To mitigate risk when using third-party extensions, audit the source code of the extension before installing or updating the extension.
{% data reusables.cli.cli-extensions %} For more information about how to create {% data variables.product.prodname_cli %} extensions, see "[AUTOTITLE](/github-cli/github-cli/creating-github-cli-extensions)."