From c483167bff4e1ee65620f7eb935fe04648371784 Mon Sep 17 00:00:00 2001 From: Ilya Nurullin Date: Mon, 28 Jul 2025 11:10:22 +0300 Subject: [PATCH 1/5] Use configurable remote name in snippets --- modules/setting/repository.go | 2 ++ routers/web/repo/issue_view.go | 1 + services/context/repo.go | 1 + templates/repo/empty.tmpl | 8 ++++---- templates/repo/issue/view_content/pull_merge_box.tmpl | 2 +- .../repo/issue/view_content/pull_merge_instruction.tmpl | 6 +++--- 6 files changed, 12 insertions(+), 8 deletions(-) diff --git a/modules/setting/repository.go b/modules/setting/repository.go index 318cf4110855c..d4cbe7664a7b7 100644 --- a/modules/setting/repository.go +++ b/modules/setting/repository.go @@ -48,6 +48,7 @@ var ( DisableMigrations bool DisableStars bool `ini:"DISABLE_STARS"` DefaultBranch string + SnippetRemoteName string AllowAdoptionOfUnadoptedRepositories bool AllowDeleteOfUnadoptedRepositories bool DisableDownloadSourceArchives bool @@ -166,6 +167,7 @@ var ( DisableMigrations: false, DisableStars: false, DefaultBranch: "main", + SnippetRemoteName: "origin", AllowForkWithoutMaximumLimit: true, // Repository editor settings diff --git a/routers/web/repo/issue_view.go b/routers/web/repo/issue_view.go index d0064e763ef82..a1d513a8f2324 100644 --- a/routers/web/repo/issue_view.go +++ b/routers/web/repo/issue_view.go @@ -446,6 +446,7 @@ func ViewPullMergeBox(ctx *context.Context) { // TODO: it should use a dedicated struct to render the pull merge box, to make sure all data is prepared correctly ctx.Data["IsIssuePoster"] = ctx.IsSigned && issue.IsPoster(ctx.Doer.ID) + ctx.Data["SnippetRemoteName"] = setting.Repository.SnippetRemoteName ctx.Data["HasIssuesOrPullsWritePermission"] = ctx.Repo.CanWriteIssuesOrPulls(issue.IsPull) ctx.HTML(http.StatusOK, tplPullMergeBox) } diff --git a/services/context/repo.go b/services/context/repo.go index afc6de9b1666d..67b834b378b5a 100644 --- a/services/context/repo.go +++ b/services/context/repo.go @@ -542,6 +542,7 @@ func RepoAssignment(ctx *Context) { ctx.Data["CanWriteIssues"] = ctx.Repo.CanWrite(unit_model.TypeIssues) ctx.Data["CanWritePulls"] = ctx.Repo.CanWrite(unit_model.TypePullRequests) ctx.Data["CanWriteActions"] = ctx.Repo.CanWrite(unit_model.TypeActions) + ctx.Data["SnippetRemoteName"] = setting.Repository.SnippetRemoteName canSignedUserFork, err := repo_module.CanUserForkRepo(ctx, ctx.Doer, ctx.Repo.Repository) if err != nil { diff --git a/templates/repo/empty.tmpl b/templates/repo/empty.tmpl index 32b5c8401b3f2..487d1368a8b6c 100644 --- a/templates/repo/empty.tmpl +++ b/templates/repo/empty.tmpl @@ -51,8 +51,8 @@ git init{{if ne .Repository.ObjectFormatName "sha1"}} --object-format={{.Reposit {{if ne .Repository.DefaultBranch "master"}}git checkout -b {{.Repository.DefaultBranch}}{{end}} git add README.md git commit -m "first commit" -git remote add origin {{$.CloneButtonOriginLink.HTTPS}} -git push -u origin {{.Repository.DefaultBranch}} +git remote add {{.SnippetRemoteName}} {{$.CloneButtonOriginLink.HTTPS}} +git push -u {{.SnippetRemoteName}} {{.Repository.DefaultBranch}}
@@ -60,8 +60,8 @@ git push -u origin {{.Repository.DefaultBranch}}

{{ctx.Locale.Tr "repo.push_exist_repo"}}

-
git remote add origin {{$.CloneButtonOriginLink.HTTPS}}
-git push -u origin {{.Repository.DefaultBranch}}
+
git remote add {{.SnippetRemoteName}} {{$.CloneButtonOriginLink.HTTPS}}
+git push -u {{.SnippetRemoteName}} {{.Repository.DefaultBranch}}
{{end}} diff --git a/templates/repo/issue/view_content/pull_merge_box.tmpl b/templates/repo/issue/view_content/pull_merge_box.tmpl index 113bfb732ecee..6998bc0d63d42 100644 --- a/templates/repo/issue/view_content/pull_merge_box.tmpl +++ b/templates/repo/issue/view_content/pull_merge_box.tmpl @@ -396,7 +396,7 @@ {{end}} {{if and .Issue.PullRequest.HeadRepo (not .Issue.PullRequest.HasMerged) (not .Issue.IsClosed)}} - {{template "repo/issue/view_content/pull_merge_instruction" dict "PullRequest" .Issue.PullRequest "ShowMergeInstructions" .ShowMergeInstructions}} + {{template "repo/issue/view_content/pull_merge_instruction" dict "PullRequest" .Issue.PullRequest "ShowMergeInstructions" .ShowMergeInstructions "SnippetRemoteName" .SnippetRemoteName}} {{end}} diff --git a/templates/repo/issue/view_content/pull_merge_instruction.tmpl b/templates/repo/issue/view_content/pull_merge_instruction.tmpl index 9dbcbeee21da3..70f597ca5a8a3 100644 --- a/templates/repo/issue/view_content/pull_merge_instruction.tmpl +++ b/templates/repo/issue/view_content/pull_merge_instruction.tmpl @@ -9,9 +9,9 @@ {{end}}
{{if eq .PullRequest.Flow 0}} -
git fetch -u {{if ne .PullRequest.HeadRepo.ID .PullRequest.BaseRepo.ID}}{{else}}origin{{end}} {{.PullRequest.HeadBranch}}:{{$localBranch}}
+
git fetch -u {{if ne .PullRequest.HeadRepo.ID .PullRequest.BaseRepo.ID}}{{else}}{{.SnippetRemoteName}}{{end}} {{.PullRequest.HeadBranch}}:{{$localBranch}}
{{else}} -
git fetch -u origin {{.PullRequest.GetGitHeadRefName}}:{{$localBranch}}
+
git fetch -u {{.SnippetRemoteName}} {{.PullRequest.GetGitHeadRefName}}:{{$localBranch}}
{{end}}
git checkout {{$localBranch}}
@@ -50,7 +50,7 @@
git checkout {{.PullRequest.BaseBranch}}
git merge {{$localBranch}}
-
git push origin {{.PullRequest.BaseBranch}}
+
git push {{.SnippetRemoteName}} {{.PullRequest.BaseBranch}}
{{end}} From 765b2c6355866c4ad7e642aa79c9f045f0a6936d Mon Sep 17 00:00:00 2001 From: Ilya Nurullin Date: Tue, 29 Jul 2025 17:36:40 +0300 Subject: [PATCH 2/5] Store remote name in config database --- modules/setting/config.go | 2 ++ modules/setting/config/value.go | 4 ++++ modules/setting/repository.go | 2 -- routers/web/admin/config.go | 15 +++++++++++++++ routers/web/repo/issue_view.go | 2 +- services/context/repo.go | 2 +- templates/admin/config_settings.tmpl | 15 +++++++++++++++ 7 files changed, 38 insertions(+), 4 deletions(-) diff --git a/modules/setting/config.go b/modules/setting/config.go index 03558574c2110..32d36044ae00c 100644 --- a/modules/setting/config.go +++ b/modules/setting/config.go @@ -49,6 +49,7 @@ func DefaultOpenWithEditorApps() OpenWithEditorAppsType { type RepositoryStruct struct { OpenWithEditorApps *config.Value[OpenWithEditorAppsType] + SnippetRemoteName *config.Value[string] } type ConfigStruct struct { @@ -70,6 +71,7 @@ func initDefaultConfig() { }, Repository: &RepositoryStruct{ OpenWithEditorApps: config.ValueJSON[OpenWithEditorAppsType]("repository.open-with.editor-apps"), + SnippetRemoteName: config.ValueJSON[string]("repository.snippet-remote-name").WithDefault("origin"), }, } } diff --git a/modules/setting/config/value.go b/modules/setting/config/value.go index f0ec12054478d..0a111ca83c322 100644 --- a/modules/setting/config/value.go +++ b/modules/setting/config/value.go @@ -79,6 +79,10 @@ func (value *Value[T]) DynKey() string { return value.dynKey } +func (value *Value[T]) Def() T { + return value.def +} + func (value *Value[T]) WithDefault(def T) *Value[T] { value.def = def return value diff --git a/modules/setting/repository.go b/modules/setting/repository.go index d4cbe7664a7b7..318cf4110855c 100644 --- a/modules/setting/repository.go +++ b/modules/setting/repository.go @@ -48,7 +48,6 @@ var ( DisableMigrations bool DisableStars bool `ini:"DISABLE_STARS"` DefaultBranch string - SnippetRemoteName string AllowAdoptionOfUnadoptedRepositories bool AllowDeleteOfUnadoptedRepositories bool DisableDownloadSourceArchives bool @@ -167,7 +166,6 @@ var ( DisableMigrations: false, DisableStars: false, DefaultBranch: "main", - SnippetRemoteName: "origin", AllowForkWithoutMaximumLimit: true, // Repository editor settings diff --git a/routers/web/admin/config.go b/routers/web/admin/config.go index 0e5b23db6d562..482dea61a81ae 100644 --- a/routers/web/admin/config.go +++ b/routers/web/admin/config.go @@ -206,6 +206,20 @@ func ChangeConfig(ctx *context.Context) { } return "false", nil } + + marshalStringWithDefault := func(def string) func(v string) (string, error) { + return func(v string) (string, error) { + if strings.TrimSpace(v) == "" { + v = def + } + b, err := json.Marshal(v) + if err != nil { + return "", err + } + return string(b), nil + } + } + marshalOpenWithApps := func(value string) (string, error) { lines := strings.Split(value, "\n") var openWithEditorApps setting.OpenWithEditorAppsType @@ -234,6 +248,7 @@ func ChangeConfig(ctx *context.Context) { cfg.Picture.DisableGravatar.DynKey(): marshalBool, cfg.Picture.EnableFederatedAvatar.DynKey(): marshalBool, cfg.Repository.OpenWithEditorApps.DynKey(): marshalOpenWithApps, + cfg.Repository.SnippetRemoteName.DynKey(): marshalStringWithDefault(cfg.Repository.SnippetRemoteName.Def()), } marshaller, hasMarshaller := marshallers[key] if !hasMarshaller { diff --git a/routers/web/repo/issue_view.go b/routers/web/repo/issue_view.go index a1d513a8f2324..71fbb3db197ec 100644 --- a/routers/web/repo/issue_view.go +++ b/routers/web/repo/issue_view.go @@ -446,7 +446,7 @@ func ViewPullMergeBox(ctx *context.Context) { // TODO: it should use a dedicated struct to render the pull merge box, to make sure all data is prepared correctly ctx.Data["IsIssuePoster"] = ctx.IsSigned && issue.IsPoster(ctx.Doer.ID) - ctx.Data["SnippetRemoteName"] = setting.Repository.SnippetRemoteName + ctx.Data["SnippetRemoteName"] = setting.Config().Repository.SnippetRemoteName.Value(ctx) ctx.Data["HasIssuesOrPullsWritePermission"] = ctx.Repo.CanWriteIssuesOrPulls(issue.IsPull) ctx.HTML(http.StatusOK, tplPullMergeBox) } diff --git a/services/context/repo.go b/services/context/repo.go index 67b834b378b5a..9c1c19abbb33e 100644 --- a/services/context/repo.go +++ b/services/context/repo.go @@ -542,7 +542,7 @@ func RepoAssignment(ctx *Context) { ctx.Data["CanWriteIssues"] = ctx.Repo.CanWrite(unit_model.TypeIssues) ctx.Data["CanWritePulls"] = ctx.Repo.CanWrite(unit_model.TypePullRequests) ctx.Data["CanWriteActions"] = ctx.Repo.CanWrite(unit_model.TypeActions) - ctx.Data["SnippetRemoteName"] = setting.Repository.SnippetRemoteName + ctx.Data["SnippetRemoteName"] = setting.Config().Repository.SnippetRemoteName.Value(ctx) canSignedUserFork, err := repo_module.CanUserForkRepo(ctx, ctx.Doer, ctx.Repo.Repository) if err != nil { diff --git a/templates/admin/config_settings.tmpl b/templates/admin/config_settings.tmpl index 6b9bb8275cca5..ccdd5327d674c 100644 --- a/templates/admin/config_settings.tmpl +++ b/templates/admin/config_settings.tmpl @@ -39,4 +39,19 @@ + +

+ {{ctx.Locale.Tr "admin.config.repository_snippets"}} +

+
+
+
+ + +
+
+ +
+
+
{{template "admin/layout_footer" .}} From 88776de67eff4c809660f5a587ee36215491a756 Mon Sep 17 00:00:00 2001 From: Ilya Nurullin Date: Tue, 29 Jul 2025 18:17:54 +0300 Subject: [PATCH 3/5] run: make fmt --- modules/setting/config.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/setting/config.go b/modules/setting/config.go index 32d36044ae00c..e6dfcfc0cc79c 100644 --- a/modules/setting/config.go +++ b/modules/setting/config.go @@ -49,7 +49,7 @@ func DefaultOpenWithEditorApps() OpenWithEditorAppsType { type RepositoryStruct struct { OpenWithEditorApps *config.Value[OpenWithEditorAppsType] - SnippetRemoteName *config.Value[string] + SnippetRemoteName *config.Value[string] } type ConfigStruct struct { @@ -71,7 +71,7 @@ func initDefaultConfig() { }, Repository: &RepositoryStruct{ OpenWithEditorApps: config.ValueJSON[OpenWithEditorAppsType]("repository.open-with.editor-apps"), - SnippetRemoteName: config.ValueJSON[string]("repository.snippet-remote-name").WithDefault("origin"), + SnippetRemoteName: config.ValueJSON[string]("repository.snippet-remote-name").WithDefault("origin"), }, } } From fcae5b5790ccb2d8446172eea269a16e7814077f Mon Sep 17 00:00:00 2001 From: Ilya Nurullin Date: Tue, 29 Jul 2025 18:25:26 +0300 Subject: [PATCH 4/5] Add translations --- options/locale/locale_en-US.ini | 3 +++ 1 file changed, 3 insertions(+) diff --git a/options/locale/locale_en-US.ini b/options/locale/locale_en-US.ini index 65ba4e9cd3fc5..162d427721aee 100644 --- a/options/locale/locale_en-US.ini +++ b/options/locale/locale_en-US.ini @@ -3419,6 +3419,9 @@ config.disable_gravatar = Disable Gravatar config.enable_federated_avatar = Enable Federated Avatars config.open_with_editor_app_help = The "Open with" editors for the clone menu. If left empty, the default will be used. Expand to see the default. +config.repository_snippets = Repository Snippets +config.repository_snippets.remote_name = Remote name (default: origin) + config.git_config = Git Configuration config.git_disable_diff_highlight = Disable Diff Syntax Highlight config.git_max_diff_lines = Max Diff Lines (for a single file) From eb02be960185be784d16afa3ccf49f46e30d0e5c Mon Sep 17 00:00:00 2001 From: Ilya Nurullin Date: Fri, 8 Aug 2025 18:30:49 +0300 Subject: [PATCH 5/5] use `GitRemoteName` --- modules/setting/config.go | 10 ++++++++-- options/locale/locale_en-US.ini | 4 ++-- routers/web/admin/config.go | 2 +- routers/web/repo/issue_view.go | 2 +- services/context/repo.go | 2 +- templates/admin/config_settings.tmpl | 8 ++++---- templates/repo/empty.tmpl | 8 ++++---- templates/repo/issue/view_content/pull_merge_box.tmpl | 2 +- .../issue/view_content/pull_merge_instruction.tmpl | 6 +++--- 9 files changed, 25 insertions(+), 19 deletions(-) diff --git a/modules/setting/config.go b/modules/setting/config.go index e6dfcfc0cc79c..25ceeac2a9f2e 100644 --- a/modules/setting/config.go +++ b/modules/setting/config.go @@ -49,12 +49,16 @@ func DefaultOpenWithEditorApps() OpenWithEditorAppsType { type RepositoryStruct struct { OpenWithEditorApps *config.Value[OpenWithEditorAppsType] - SnippetRemoteName *config.Value[string] +} + +type TemplateStruct struct { + GitRemoteName *config.Value[string] } type ConfigStruct struct { Picture *PictureStruct Repository *RepositoryStruct + Template *TemplateStruct } var ( @@ -71,7 +75,9 @@ func initDefaultConfig() { }, Repository: &RepositoryStruct{ OpenWithEditorApps: config.ValueJSON[OpenWithEditorAppsType]("repository.open-with.editor-apps"), - SnippetRemoteName: config.ValueJSON[string]("repository.snippet-remote-name").WithDefault("origin"), + }, + Template: &TemplateStruct{ + GitRemoteName: config.ValueJSON[string]("template.git-remote-name").WithDefault("origin"), }, } } diff --git a/options/locale/locale_en-US.ini b/options/locale/locale_en-US.ini index 162d427721aee..9cd6cd4a4cd76 100644 --- a/options/locale/locale_en-US.ini +++ b/options/locale/locale_en-US.ini @@ -3419,8 +3419,8 @@ config.disable_gravatar = Disable Gravatar config.enable_federated_avatar = Enable Federated Avatars config.open_with_editor_app_help = The "Open with" editors for the clone menu. If left empty, the default will be used. Expand to see the default. -config.repository_snippets = Repository Snippets -config.repository_snippets.remote_name = Remote name (default: origin) +config.empty_repo_page = Empty Repo Page +config.empty_repo_page.git_remote_name = Git Remote Name (default: origin) config.git_config = Git Configuration config.git_disable_diff_highlight = Disable Diff Syntax Highlight diff --git a/routers/web/admin/config.go b/routers/web/admin/config.go index 482dea61a81ae..b0a4cf9670998 100644 --- a/routers/web/admin/config.go +++ b/routers/web/admin/config.go @@ -248,7 +248,7 @@ func ChangeConfig(ctx *context.Context) { cfg.Picture.DisableGravatar.DynKey(): marshalBool, cfg.Picture.EnableFederatedAvatar.DynKey(): marshalBool, cfg.Repository.OpenWithEditorApps.DynKey(): marshalOpenWithApps, - cfg.Repository.SnippetRemoteName.DynKey(): marshalStringWithDefault(cfg.Repository.SnippetRemoteName.Def()), + cfg.Template.GitRemoteName.DynKey(): marshalStringWithDefault(cfg.Template.GitRemoteName.Def()), } marshaller, hasMarshaller := marshallers[key] if !hasMarshaller { diff --git a/routers/web/repo/issue_view.go b/routers/web/repo/issue_view.go index 71fbb3db197ec..17712a053bf1b 100644 --- a/routers/web/repo/issue_view.go +++ b/routers/web/repo/issue_view.go @@ -446,7 +446,7 @@ func ViewPullMergeBox(ctx *context.Context) { // TODO: it should use a dedicated struct to render the pull merge box, to make sure all data is prepared correctly ctx.Data["IsIssuePoster"] = ctx.IsSigned && issue.IsPoster(ctx.Doer.ID) - ctx.Data["SnippetRemoteName"] = setting.Config().Repository.SnippetRemoteName.Value(ctx) + ctx.Data["GitRemoteName"] = setting.Config().Template.GitRemoteName.Value(ctx) ctx.Data["HasIssuesOrPullsWritePermission"] = ctx.Repo.CanWriteIssuesOrPulls(issue.IsPull) ctx.HTML(http.StatusOK, tplPullMergeBox) } diff --git a/services/context/repo.go b/services/context/repo.go index 9c1c19abbb33e..e4cfad8ee6f9e 100644 --- a/services/context/repo.go +++ b/services/context/repo.go @@ -542,7 +542,7 @@ func RepoAssignment(ctx *Context) { ctx.Data["CanWriteIssues"] = ctx.Repo.CanWrite(unit_model.TypeIssues) ctx.Data["CanWritePulls"] = ctx.Repo.CanWrite(unit_model.TypePullRequests) ctx.Data["CanWriteActions"] = ctx.Repo.CanWrite(unit_model.TypeActions) - ctx.Data["SnippetRemoteName"] = setting.Config().Repository.SnippetRemoteName.Value(ctx) + ctx.Data["GitRemoteName"] = setting.Config().Template.GitRemoteName.Value(ctx) canSignedUserFork, err := repo_module.CanUserForkRepo(ctx, ctx.Doer, ctx.Repo.Repository) if err != nil { diff --git a/templates/admin/config_settings.tmpl b/templates/admin/config_settings.tmpl index ccdd5327d674c..16bb89e8ad423 100644 --- a/templates/admin/config_settings.tmpl +++ b/templates/admin/config_settings.tmpl @@ -41,13 +41,13 @@

- {{ctx.Locale.Tr "admin.config.repository_snippets"}} + {{ctx.Locale.Tr "admin.config.empty_repo_page"}}

-
+
- - + +
diff --git a/templates/repo/empty.tmpl b/templates/repo/empty.tmpl index 487d1368a8b6c..98d09774bf1f1 100644 --- a/templates/repo/empty.tmpl +++ b/templates/repo/empty.tmpl @@ -51,8 +51,8 @@ git init{{if ne .Repository.ObjectFormatName "sha1"}} --object-format={{.Reposit {{if ne .Repository.DefaultBranch "master"}}git checkout -b {{.Repository.DefaultBranch}}{{end}} git add README.md git commit -m "first commit" -git remote add {{.SnippetRemoteName}} {{$.CloneButtonOriginLink.HTTPS}} -git push -u {{.SnippetRemoteName}} {{.Repository.DefaultBranch}} +git remote add {{.GitRemoteName}} {{$.CloneButtonOriginLink.HTTPS}} +git push -u {{.GitRemoteName}} {{.Repository.DefaultBranch}}
@@ -60,8 +60,8 @@ git push -u {{.SnippetRemoteName}} {{.Repository.DefaultBranch}}

{{ctx.Locale.Tr "repo.push_exist_repo"}}

-
git remote add {{.SnippetRemoteName}} {{$.CloneButtonOriginLink.HTTPS}}
-git push -u {{.SnippetRemoteName}} {{.Repository.DefaultBranch}}
+
git remote add {{.GitRemoteName}} {{$.CloneButtonOriginLink.HTTPS}}
+git push -u {{.GitRemoteName}} {{.Repository.DefaultBranch}}
{{end}} diff --git a/templates/repo/issue/view_content/pull_merge_box.tmpl b/templates/repo/issue/view_content/pull_merge_box.tmpl index 6998bc0d63d42..4e4ff70d99d8b 100644 --- a/templates/repo/issue/view_content/pull_merge_box.tmpl +++ b/templates/repo/issue/view_content/pull_merge_box.tmpl @@ -396,7 +396,7 @@ {{end}} {{if and .Issue.PullRequest.HeadRepo (not .Issue.PullRequest.HasMerged) (not .Issue.IsClosed)}} - {{template "repo/issue/view_content/pull_merge_instruction" dict "PullRequest" .Issue.PullRequest "ShowMergeInstructions" .ShowMergeInstructions "SnippetRemoteName" .SnippetRemoteName}} + {{template "repo/issue/view_content/pull_merge_instruction" dict "PullRequest" .Issue.PullRequest "ShowMergeInstructions" .ShowMergeInstructions "GitRemoteName" .GitRemoteName}} {{end}} diff --git a/templates/repo/issue/view_content/pull_merge_instruction.tmpl b/templates/repo/issue/view_content/pull_merge_instruction.tmpl index 70f597ca5a8a3..ef1252f1f044b 100644 --- a/templates/repo/issue/view_content/pull_merge_instruction.tmpl +++ b/templates/repo/issue/view_content/pull_merge_instruction.tmpl @@ -9,9 +9,9 @@ {{end}}
{{if eq .PullRequest.Flow 0}} -
git fetch -u {{if ne .PullRequest.HeadRepo.ID .PullRequest.BaseRepo.ID}}{{else}}{{.SnippetRemoteName}}{{end}} {{.PullRequest.HeadBranch}}:{{$localBranch}}
+
git fetch -u {{if ne .PullRequest.HeadRepo.ID .PullRequest.BaseRepo.ID}}{{else}}{{.GitRemoteName}}{{end}} {{.PullRequest.HeadBranch}}:{{$localBranch}}
{{else}} -
git fetch -u {{.SnippetRemoteName}} {{.PullRequest.GetGitHeadRefName}}:{{$localBranch}}
+
git fetch -u {{.GitRemoteName}} {{.PullRequest.GetGitHeadRefName}}:{{$localBranch}}
{{end}}
git checkout {{$localBranch}}
@@ -50,7 +50,7 @@
git checkout {{.PullRequest.BaseBranch}}
git merge {{$localBranch}}
-
git push {{.SnippetRemoteName}} {{.PullRequest.BaseBranch}}
+
git push {{.GitRemoteName}} {{.PullRequest.BaseBranch}}
{{end}}