From 19a1c48ef62dc008e5c0e4c743e1ca8a76f6367c Mon Sep 17 00:00:00 2001 From: dkwon17 Date: Tue, 20 Dec 2022 16:48:35 +0000 Subject: [PATCH 1/8] docs: URL parameter for configuring remotes Signed-off-by: dkwon17 --- modules/end-user-guide/nav.adoc | 1 + ...meter-for-configuring-project-remotes.adoc | 49 +++++++++++++++++++ 2 files changed, 50 insertions(+) create mode 100644 modules/end-user-guide/pages/url-parameter-for-configuring-project-remotes.adoc diff --git a/modules/end-user-guide/nav.adoc b/modules/end-user-guide/nav.adoc index 52d70e9ea3..c98b3f39fb 100644 --- a/modules/end-user-guide/nav.adoc +++ b/modules/end-user-guide/nav.adoc @@ -14,6 +14,7 @@ *** xref:url-parameter-for-the-devfile-file-name.adoc[] *** xref:url-parameter-for-the-devfile-file-path.adoc[] *** xref:url-parameter-for-the-workspace-storage.adoc[] +*** xref:url-parameter-for-configuring-project-remotes.adoc[] ** xref:basic-actions-you-can-perform-on-a-workspace.adoc[] ** xref:authenticating-to-a-git-server-from-a-workspace.adoc[] * xref:customizing-workspace-components.adoc[] diff --git a/modules/end-user-guide/pages/url-parameter-for-configuring-project-remotes.adoc b/modules/end-user-guide/pages/url-parameter-for-configuring-project-remotes.adoc new file mode 100644 index 0000000000..cca0345089 --- /dev/null +++ b/modules/end-user-guide/pages/url-parameter-for-configuring-project-remotes.adoc @@ -0,0 +1,49 @@ +:_content-type: CONCEPT +:description: URL parameter for configuring project remotes +:keywords: configuring-remotes, configuring-remotes-parameter, remotes-parameter, project-remotes-parameter +:navtitle: URL parameter for configuring project remotes +:page-aliases: + +[id="url-parameter-for-configuring-project-remotes"] += URL parameter for configuring project remotes + +When you visit a URL for starting a new workspace, one Git remote will be configured by default. Git remotes can be configured manually in the command line after workspace startup, or manually by editing the workspace's {devworkspace} {orch-name} resource after workspace creation. + +To have {prod-short} automatically configure Git remotes on workspace creation, the `remotes=` URL parameter can be used. + +The first remote specified in the `remotes` parameter will have it's default branch checked out on workspace startup. + +The value of the `remotes` parameter can be provided in two formats: by providing both remote names and URLs, and by providing only URLs. + +== Providing remote names and URLs + +Remote names and URLs can be specified by providing a list of `{name,URL}` pairs in the following format: + +[source,subs="+quotes,+attributes,+macros"] +---- +{{origin,https://git-url/origin/project.git},{upstream,https://git-url/upstream/project.git}, ... } <1> +---- + +The following example configures two remotes on workspace creation, `origin` and `upstream`. The `origin` remote's default branch is checked out on workspace startup. +[source,subs="+quotes,+attributes,+macros"] +---- +pass:c,a,q[{prod-url}]#____?remotes={{origin,https://git-url/origin/project.git},{upstream,https://git-url/upstream/project.git}} +---- + +== Providing only URLs + +Remote URLs can be specified by providing a list of URLs in the following format: + +[source,subs="+quotes,+attributes,+macros"] +---- +{https://git-url/origin/project.git,https://git-url/upstream/project.git, ... } +---- + +When remotes are configured in this format, the remote names are implicit. +The first remote is `origin`, the second remote is `upstream`, and subsequent remotes are `fork1`, `fork2`, ... , `fork(n-2)`. + +The following example configures three remotes on workspace creation, `origin`, `upstream`, and `fork1`. The `origin` remote's default branch is checked out on workspace startup. +[source,subs="+quotes,+attributes,+macros"] +---- +pass:c,a,q[{prod-url}]#____?remotes={https://git-url/origin/project.git,https://git-url/upstream/project.git,https://git-url/user/project.git} <1> +---- From 8c3e603f1b240c68533f75ec3ee64d5b083fed52 Mon Sep 17 00:00:00 2001 From: David Kwon Date: Mon, 9 Jan 2023 11:29:38 -0500 Subject: [PATCH 2/8] Update modules/end-user-guide/pages/url-parameter-for-configuring-project-remotes.adoc Co-authored-by: Nick Boldt --- .../pages/url-parameter-for-configuring-project-remotes.adoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/end-user-guide/pages/url-parameter-for-configuring-project-remotes.adoc b/modules/end-user-guide/pages/url-parameter-for-configuring-project-remotes.adoc index cca0345089..2c49def8ca 100644 --- a/modules/end-user-guide/pages/url-parameter-for-configuring-project-remotes.adoc +++ b/modules/end-user-guide/pages/url-parameter-for-configuring-project-remotes.adoc @@ -11,7 +11,7 @@ When you visit a URL for starting a new workspace, one Git remote will be config To have {prod-short} automatically configure Git remotes on workspace creation, the `remotes=` URL parameter can be used. -The first remote specified in the `remotes` parameter will have it's default branch checked out on workspace startup. +The first remote specified in the `remotes` parameter will have its default branch checked out on workspace startup. The value of the `remotes` parameter can be provided in two formats: by providing both remote names and URLs, and by providing only URLs. From cea0af57cd9a28e32667846f1a984e5aec5afc7b Mon Sep 17 00:00:00 2001 From: David Kwon Date: Mon, 9 Jan 2023 11:30:07 -0500 Subject: [PATCH 3/8] Update modules/end-user-guide/pages/url-parameter-for-configuring-project-remotes.adoc Co-authored-by: Nick Boldt --- .../pages/url-parameter-for-configuring-project-remotes.adoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/end-user-guide/pages/url-parameter-for-configuring-project-remotes.adoc b/modules/end-user-guide/pages/url-parameter-for-configuring-project-remotes.adoc index 2c49def8ca..035f59c171 100644 --- a/modules/end-user-guide/pages/url-parameter-for-configuring-project-remotes.adoc +++ b/modules/end-user-guide/pages/url-parameter-for-configuring-project-remotes.adoc @@ -13,7 +13,7 @@ To have {prod-short} automatically configure Git remotes on workspace creation, The first remote specified in the `remotes` parameter will have its default branch checked out on workspace startup. -The value of the `remotes` parameter can be provided in two formats: by providing both remote names and URLs, and by providing only URLs. +The value of the `remotes` parameter can be provided in two formats: by providing both remote names and URLs, or by providing only URLs. == Providing remote names and URLs From 385afc73acda3e26d228a7c94903f1cbab839471 Mon Sep 17 00:00:00 2001 From: David Kwon Date: Mon, 9 Jan 2023 11:30:36 -0500 Subject: [PATCH 4/8] Update modules/end-user-guide/pages/url-parameter-for-configuring-project-remotes.adoc Co-authored-by: Nick Boldt --- .../pages/url-parameter-for-configuring-project-remotes.adoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/end-user-guide/pages/url-parameter-for-configuring-project-remotes.adoc b/modules/end-user-guide/pages/url-parameter-for-configuring-project-remotes.adoc index 035f59c171..d3f4e976d5 100644 --- a/modules/end-user-guide/pages/url-parameter-for-configuring-project-remotes.adoc +++ b/modules/end-user-guide/pages/url-parameter-for-configuring-project-remotes.adoc @@ -7,7 +7,7 @@ [id="url-parameter-for-configuring-project-remotes"] = URL parameter for configuring project remotes -When you visit a URL for starting a new workspace, one Git remote will be configured by default. Git remotes can be configured manually in the command line after workspace startup, or manually by editing the workspace's {devworkspace} {orch-name} resource after workspace creation. +When you open a URL to start a new workspace, one Git remote will be configured automatically. Additional Git remotes can then be configured on the command line after workspace startup, or by editing the {devworkspace} {orch-name} resource for the new workspace after its creation. To have {prod-short} automatically configure Git remotes on workspace creation, the `remotes=` URL parameter can be used. From e2602d876a982ea5814341e863932cc6e18fad99 Mon Sep 17 00:00:00 2001 From: dkwon17 Date: Thu, 12 Jan 2023 20:55:40 +0000 Subject: [PATCH 5/8] Small wording change, add xref Signed-off-by: dkwon17 --- ...al-parameters-for-the-urls-for-starting-a-new-workspace.adoc | 1 + .../pages/url-parameter-for-configuring-project-remotes.adoc | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/modules/end-user-guide/pages/optional-parameters-for-the-urls-for-starting-a-new-workspace.adoc b/modules/end-user-guide/pages/optional-parameters-for-the-urls-for-starting-a-new-workspace.adoc index b36101885e..83c4f462c1 100644 --- a/modules/end-user-guide/pages/optional-parameters-for-the-urls-for-starting-a-new-workspace.adoc +++ b/modules/end-user-guide/pages/optional-parameters-for-the-urls-for-starting-a-new-workspace.adoc @@ -15,3 +15,4 @@ When you start a new workspace, {prod-short} configures the workspace according * xref:url-parameter-for-the-devfile-file-name.adoc[] * xref:url-parameter-for-the-devfile-file-path.adoc[] * xref:url-parameter-for-the-workspace-storage.adoc[] +* xref:url-parameter-for-configuring-project-remotes.adoc[] diff --git a/modules/end-user-guide/pages/url-parameter-for-configuring-project-remotes.adoc b/modules/end-user-guide/pages/url-parameter-for-configuring-project-remotes.adoc index d3f4e976d5..c4990380ac 100644 --- a/modules/end-user-guide/pages/url-parameter-for-configuring-project-remotes.adoc +++ b/modules/end-user-guide/pages/url-parameter-for-configuring-project-remotes.adoc @@ -7,7 +7,7 @@ [id="url-parameter-for-configuring-project-remotes"] = URL parameter for configuring project remotes -When you open a URL to start a new workspace, one Git remote will be configured automatically. Additional Git remotes can then be configured on the command line after workspace startup, or by editing the {devworkspace} {orch-name} resource for the new workspace after its creation. +When you open a URL to start a new workspace, the origin remote will be configured automatically. Additional Git remotes can be configured on the command line after workspace startup, or by editing the {devworkspace} {orch-name} resource for the new workspace after its creation. To have {prod-short} automatically configure Git remotes on workspace creation, the `remotes=` URL parameter can be used. From 6f52639b639a30f3917351498b67cd12e0250069 Mon Sep 17 00:00:00 2001 From: dkwon17 Date: Thu, 12 Jan 2023 21:05:17 +0000 Subject: [PATCH 6/8] Remove <1> Signed-off-by: dkwon17 --- .../pages/url-parameter-for-configuring-project-remotes.adoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/end-user-guide/pages/url-parameter-for-configuring-project-remotes.adoc b/modules/end-user-guide/pages/url-parameter-for-configuring-project-remotes.adoc index c4990380ac..a9896f9278 100644 --- a/modules/end-user-guide/pages/url-parameter-for-configuring-project-remotes.adoc +++ b/modules/end-user-guide/pages/url-parameter-for-configuring-project-remotes.adoc @@ -21,7 +21,7 @@ Remote names and URLs can be specified by providing a list of `{name,URL}` pairs [source,subs="+quotes,+attributes,+macros"] ---- -{{origin,https://git-url/origin/project.git},{upstream,https://git-url/upstream/project.git}, ... } <1> +{{origin,https://git-url/origin/project.git},{upstream,https://git-url/upstream/project.git}, ... } ---- The following example configures two remotes on workspace creation, `origin` and `upstream`. The `origin` remote's default branch is checked out on workspace startup. From 7d5025a6e7168fedc220a003b7dcbcabb9f6e2b7 Mon Sep 17 00:00:00 2001 From: Max Leonov Date: Thu, 19 Jan 2023 23:35:04 +0200 Subject: [PATCH 7/8] initial edits --- modules/end-user-guide/nav.adoc | 2 +- ...the-urls-for-starting-a-new-workspace.adoc | 2 +- .../url-parameter-for-additional-remotes.adoc | 25 ++++++++++ ...meter-for-configuring-project-remotes.adoc | 49 ------------------- 4 files changed, 27 insertions(+), 51 deletions(-) create mode 100644 modules/end-user-guide/pages/url-parameter-for-additional-remotes.adoc delete mode 100644 modules/end-user-guide/pages/url-parameter-for-configuring-project-remotes.adoc diff --git a/modules/end-user-guide/nav.adoc b/modules/end-user-guide/nav.adoc index c98b3f39fb..e3f4375339 100644 --- a/modules/end-user-guide/nav.adoc +++ b/modules/end-user-guide/nav.adoc @@ -14,7 +14,7 @@ *** xref:url-parameter-for-the-devfile-file-name.adoc[] *** xref:url-parameter-for-the-devfile-file-path.adoc[] *** xref:url-parameter-for-the-workspace-storage.adoc[] -*** xref:url-parameter-for-configuring-project-remotes.adoc[] +*** xref:url-parameter-for-additional-remotes.adoc[] ** xref:basic-actions-you-can-perform-on-a-workspace.adoc[] ** xref:authenticating-to-a-git-server-from-a-workspace.adoc[] * xref:customizing-workspace-components.adoc[] diff --git a/modules/end-user-guide/pages/optional-parameters-for-the-urls-for-starting-a-new-workspace.adoc b/modules/end-user-guide/pages/optional-parameters-for-the-urls-for-starting-a-new-workspace.adoc index 83c4f462c1..90478cd183 100644 --- a/modules/end-user-guide/pages/optional-parameters-for-the-urls-for-starting-a-new-workspace.adoc +++ b/modules/end-user-guide/pages/optional-parameters-for-the-urls-for-starting-a-new-workspace.adoc @@ -15,4 +15,4 @@ When you start a new workspace, {prod-short} configures the workspace according * xref:url-parameter-for-the-devfile-file-name.adoc[] * xref:url-parameter-for-the-devfile-file-path.adoc[] * xref:url-parameter-for-the-workspace-storage.adoc[] -* xref:url-parameter-for-configuring-project-remotes.adoc[] +* xref:url-parameter-for-additional-remotes.adoc[] diff --git a/modules/end-user-guide/pages/url-parameter-for-additional-remotes.adoc b/modules/end-user-guide/pages/url-parameter-for-additional-remotes.adoc new file mode 100644 index 0000000000..ce8c95d3c3 --- /dev/null +++ b/modules/end-user-guide/pages/url-parameter-for-additional-remotes.adoc @@ -0,0 +1,25 @@ +:_content-type: CONCEPT +:description: URL parameter for additional remotes +:keywords: additional-remote, more-remotes, configure-remote, remotes-parameter +:navtitle: URL parameter for additional remotes +:page-aliases: + +[id="url-parameter-for-additional-remotes"] += URL parameter for additional remotes + +When you visit a URL for starting a new workspace, {prod-short} configures the `origin` remote to be the Git repository that you specified with `#` after the FQDN URL of your organization’s {prod-short} instance. + +The URL parameter for cloning and configuring additional remotes for the workspace is `remotes=`: + +[source,subs="+quotes,+attributes,+macros"] +---- +pass:c,a,q[{prod-url}]#____?remotes={{____,____},{____,____},{____,____},...} +---- + +[IMPORTANT] +==== +If you do not enter the name `origin` for any of the additional remotes, the remote from ____ will be cloned and named `origin` by default, and its expected branch will be checked out automatically. + +If you enter the name `origin` for one of the additional remotes, its default branch will be checked out automatically, but the remote from ____ will NOT be cloned for the workspace. +==== + diff --git a/modules/end-user-guide/pages/url-parameter-for-configuring-project-remotes.adoc b/modules/end-user-guide/pages/url-parameter-for-configuring-project-remotes.adoc deleted file mode 100644 index a9896f9278..0000000000 --- a/modules/end-user-guide/pages/url-parameter-for-configuring-project-remotes.adoc +++ /dev/null @@ -1,49 +0,0 @@ -:_content-type: CONCEPT -:description: URL parameter for configuring project remotes -:keywords: configuring-remotes, configuring-remotes-parameter, remotes-parameter, project-remotes-parameter -:navtitle: URL parameter for configuring project remotes -:page-aliases: - -[id="url-parameter-for-configuring-project-remotes"] -= URL parameter for configuring project remotes - -When you open a URL to start a new workspace, the origin remote will be configured automatically. Additional Git remotes can be configured on the command line after workspace startup, or by editing the {devworkspace} {orch-name} resource for the new workspace after its creation. - -To have {prod-short} automatically configure Git remotes on workspace creation, the `remotes=` URL parameter can be used. - -The first remote specified in the `remotes` parameter will have its default branch checked out on workspace startup. - -The value of the `remotes` parameter can be provided in two formats: by providing both remote names and URLs, or by providing only URLs. - -== Providing remote names and URLs - -Remote names and URLs can be specified by providing a list of `{name,URL}` pairs in the following format: - -[source,subs="+quotes,+attributes,+macros"] ----- -{{origin,https://git-url/origin/project.git},{upstream,https://git-url/upstream/project.git}, ... } ----- - -The following example configures two remotes on workspace creation, `origin` and `upstream`. The `origin` remote's default branch is checked out on workspace startup. -[source,subs="+quotes,+attributes,+macros"] ----- -pass:c,a,q[{prod-url}]#____?remotes={{origin,https://git-url/origin/project.git},{upstream,https://git-url/upstream/project.git}} ----- - -== Providing only URLs - -Remote URLs can be specified by providing a list of URLs in the following format: - -[source,subs="+quotes,+attributes,+macros"] ----- -{https://git-url/origin/project.git,https://git-url/upstream/project.git, ... } ----- - -When remotes are configured in this format, the remote names are implicit. -The first remote is `origin`, the second remote is `upstream`, and subsequent remotes are `fork1`, `fork2`, ... , `fork(n-2)`. - -The following example configures three remotes on workspace creation, `origin`, `upstream`, and `fork1`. The `origin` remote's default branch is checked out on workspace startup. -[source,subs="+quotes,+attributes,+macros"] ----- -pass:c,a,q[{prod-url}]#____?remotes={https://git-url/origin/project.git,https://git-url/upstream/project.git,https://git-url/user/project.git} <1> ----- From 69e63f3a1f7713784d72cab05d06e03959a32cd2 Mon Sep 17 00:00:00 2001 From: Max Leonov Date: Thu, 26 Jan 2023 10:11:49 +0100 Subject: [PATCH 8/8] Update modules/end-user-guide/pages/url-parameter-for-additional-remotes.adoc --- .../pages/url-parameter-for-additional-remotes.adoc | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/modules/end-user-guide/pages/url-parameter-for-additional-remotes.adoc b/modules/end-user-guide/pages/url-parameter-for-additional-remotes.adoc index ce8c95d3c3..394b3f7936 100644 --- a/modules/end-user-guide/pages/url-parameter-for-additional-remotes.adoc +++ b/modules/end-user-guide/pages/url-parameter-for-additional-remotes.adoc @@ -18,8 +18,10 @@ pass:c,a,q[{prod-url}]#____?remotes={{____,__ [IMPORTANT] ==== -If you do not enter the name `origin` for any of the additional remotes, the remote from ____ will be cloned and named `origin` by default, and its expected branch will be checked out automatically. -If you enter the name `origin` for one of the additional remotes, its default branch will be checked out automatically, but the remote from ____ will NOT be cloned for the workspace. +* If you do not enter the name `origin` for any of the additional remotes, the remote from ____ will be cloned and named `origin` by default, and its expected branch will be checked out automatically. + +* If you enter the name `origin` for one of the additional remotes, its default branch will be checked out automatically, but the remote from ____ will NOT be cloned for the workspace. + ====