From 383862cb2f719979c350242a74cd0a5d19461f93 Mon Sep 17 00:00:00 2001
From: Will Slattum <20246633+wrslatz@users.noreply.github.com>
Date: Fri, 3 Sep 2021 11:58:06 -0400
Subject: [PATCH 1/5] Document installing extensions using full repo URL
Related to https://github.com/cli/cli/issues/4201, documented the ability to install extensions using a full repo URL. Making a contribution to cli repo as well with similar documentation.
---
.../github-cli/using-github-cli-extensions.md | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/content/github-cli/github-cli/using-github-cli-extensions.md b/content/github-cli/github-cli/using-github-cli-extensions.md
index c04aa82d5f..cf9d00570f 100644
--- a/content/github-cli/github-cli/using-github-cli-extensions.md
+++ b/content/github-cli/github-cli/using-github-cli-extensions.md
@@ -35,6 +35,16 @@ gh extension install owner/repo
If you already have an extension by the same name installed, the command will fail. For example, if you have installed `octocat/gh-whoami`, you must uninstall it before installing `hubot/gh-whoami`.
+{% note %}
+
+**Note:** You can also provide the full repository URL for the extension when installing. If the full repository URL is not used, `gh` will install the extension using the hostname to which `gh` is currently authenticated. Using the full repository URL allows GitHub Enterprise users to install extensions from public GitHub.
+
+```shell
+gh extension install https://github.com/owner/repo
+```
+
+{% endnote %}
+
## Viewing installed extensions
To view all installed extensions, use the `extensions list` subcommand. The output will also tell you which extensions have updates available.
From 1639d7252d55ea36e64b23cc7f6cec1b8e1c2010 Mon Sep 17 00:00:00 2001
From: Will Slattum <20246633+wrslatz@users.noreply.github.com>
Date: Thu, 9 Sep 2021 16:09:11 -0400
Subject: [PATCH 2/5] Rework into existing install content, remove note
---
.../github-cli/using-github-cli-extensions.md | 16 ++++------------
1 file changed, 4 insertions(+), 12 deletions(-)
diff --git a/content/github-cli/github-cli/using-github-cli-extensions.md b/content/github-cli/github-cli/using-github-cli-extensions.md
index cf9d00570f..eb97a0cb68 100644
--- a/content/github-cli/github-cli/using-github-cli-extensions.md
+++ b/content/github-cli/github-cli/using-github-cli-extensions.md
@@ -27,24 +27,16 @@ You can find extensions by browsing [repositories with the `gh-extension` topic]
## Installing extensions
-To install an extension, use the `extensions install` subcommand. Replace the `owner/repo` parameter with the name of the extension, such as `octocat/gh-whoami`.{% ifversion ghes %} If the extension is on {% data variables.product.prodname_ghe_server %}, also include the hostname, such as `https://ghe.io/octocat/gh-whoami`.{% endif %}
+To install an extension, use the `extensions install` subcommand. Replace the `repo` parameter with the repository of the extension. You can use the full URL, such as `https://github.com/octocat/gh-whoami`, or just the owner and repository, such as `octocat/gh-whoami`. If the full URL is not used, `gh` will install the extension using the hostname to which `gh` is currently authenticated.
+
+The URL format is useful when installing extensions from a different host. For example, users on {% data variables.product.prodname_ghe_server %} should use the full repository URL to install extensions from GitHub.com or any other host.
```shell
-gh extension install owner/repo
+gh extension install repo
```
If you already have an extension by the same name installed, the command will fail. For example, if you have installed `octocat/gh-whoami`, you must uninstall it before installing `hubot/gh-whoami`.
-{% note %}
-
-**Note:** You can also provide the full repository URL for the extension when installing. If the full repository URL is not used, `gh` will install the extension using the hostname to which `gh` is currently authenticated. Using the full repository URL allows GitHub Enterprise users to install extensions from public GitHub.
-
-```shell
-gh extension install https://github.com/owner/repo
-```
-
-{% endnote %}
-
## Viewing installed extensions
To view all installed extensions, use the `extensions list` subcommand. The output will also tell you which extensions have updates available.
From f87e5e5d513895be6ce3af5cd523c5a7be1f9fca Mon Sep 17 00:00:00 2001
From: Will Slattum <20246633+wrslatz@users.noreply.github.com>
Date: Thu, 9 Sep 2021 16:11:17 -0400
Subject: [PATCH 3/5] More explicitly describe hostname inferred case
---
content/github-cli/github-cli/using-github-cli-extensions.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/content/github-cli/github-cli/using-github-cli-extensions.md b/content/github-cli/github-cli/using-github-cli-extensions.md
index eb97a0cb68..369f7e4bb4 100644
--- a/content/github-cli/github-cli/using-github-cli-extensions.md
+++ b/content/github-cli/github-cli/using-github-cli-extensions.md
@@ -27,7 +27,7 @@ You can find extensions by browsing [repositories with the `gh-extension` topic]
## Installing extensions
-To install an extension, use the `extensions install` subcommand. Replace the `repo` parameter with the repository of the extension. You can use the full URL, such as `https://github.com/octocat/gh-whoami`, or just the owner and repository, such as `octocat/gh-whoami`. If the full URL is not used, `gh` will install the extension using the hostname to which `gh` is currently authenticated.
+To install an extension, use the `extensions install` subcommand. Replace the `repo` parameter with the repository of the extension. You can use the full URL, such as `https://github.com/octocat/gh-whoami`, or just the owner and repository, such as `octocat/gh-whoami`. If the owner and repository are used, `gh` will install the extension using the hostname to which `gh` is currently authenticated.
The URL format is useful when installing extensions from a different host. For example, users on {% data variables.product.prodname_ghe_server %} should use the full repository URL to install extensions from GitHub.com or any other host.
From 530f0ac21ed4c89e052afa2773f1774c3033384c Mon Sep 17 00:00:00 2001
From: Will Slattum <20246633+wrslatz@users.noreply.github.com>
Date: Fri, 10 Sep 2021 09:48:37 -0400
Subject: [PATCH 4/5] Add instruction for local extension install
---
.../github-cli/github-cli/using-github-cli-extensions.md | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/content/github-cli/github-cli/using-github-cli-extensions.md b/content/github-cli/github-cli/using-github-cli-extensions.md
index 369f7e4bb4..569e9ce512 100644
--- a/content/github-cli/github-cli/using-github-cli-extensions.md
+++ b/content/github-cli/github-cli/using-github-cli-extensions.md
@@ -27,9 +27,11 @@ You can find extensions by browsing [repositories with the `gh-extension` topic]
## Installing extensions
-To install an extension, use the `extensions install` subcommand. Replace the `repo` parameter with the repository of the extension. You can use the full URL, such as `https://github.com/octocat/gh-whoami`, or just the owner and repository, such as `octocat/gh-whoami`. If the owner and repository are used, `gh` will install the extension using the hostname to which `gh` is currently authenticated.
+To install an extension, use the `extensions install` subcommand. Replace the `repo` parameter with the repository of the extension. You can use the full URL, such as `https://github.com/octocat/gh-whoami`, or just the owner and repository, such as `octocat/gh-whoami`.
-The URL format is useful when installing extensions from a different host. For example, users on {% data variables.product.prodname_ghe_server %} should use the full repository URL to install extensions from GitHub.com or any other host.
+If the owner and repository are used, `gh` will install the extension using the hostname to which `gh` is currently authenticated. The full URL format is useful when installing extensions from a different host. For example, users on {% data variables.product.prodname_ghe_server %} should use the full repository URL to install extensions from GitHub.com or any other host.
+
+To install an extension in development from the current directory, use `.` as the value for the `repo` parameter.
```shell
gh extension install repo
From f591a793b86011591276e023fe569220297ed517 Mon Sep 17 00:00:00 2001
From: Laura Coursen
Date: Fri, 10 Sep 2021 12:19:04 -0500
Subject: [PATCH 5/5] Use product name variable
---
content/github-cli/github-cli/using-github-cli-extensions.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/content/github-cli/github-cli/using-github-cli-extensions.md b/content/github-cli/github-cli/using-github-cli-extensions.md
index 569e9ce512..27a2bc54fc 100644
--- a/content/github-cli/github-cli/using-github-cli-extensions.md
+++ b/content/github-cli/github-cli/using-github-cli-extensions.md
@@ -29,7 +29,7 @@ You can find extensions by browsing [repositories with the `gh-extension` topic]
To install an extension, use the `extensions install` subcommand. Replace the `repo` parameter with the repository of the extension. You can use the full URL, such as `https://github.com/octocat/gh-whoami`, or just the owner and repository, such as `octocat/gh-whoami`.
-If the owner and repository are used, `gh` will install the extension using the hostname to which `gh` is currently authenticated. The full URL format is useful when installing extensions from a different host. For example, users on {% data variables.product.prodname_ghe_server %} should use the full repository URL to install extensions from GitHub.com or any other host.
+If the owner and repository are used, `gh` will install the extension using the hostname to which `gh` is currently authenticated. The full URL format is useful when installing extensions from a different host. For example, users on {% data variables.product.prodname_ghe_server %} should use the full repository URL to install extensions from {% data variables.product.prodname_dotcom_the_website %} or any other host.
To install an extension in development from the current directory, use `.` as the value for the `repo` parameter.