alt
+ click/enter
to exclude labels`
issues.filter_label_no_select = All labels
@@ -1568,14 +1566,7 @@ pulls.squash_merge_pull_request = Create squash commit
pulls.merge_manually = Manually merged
pulls.merge_commit_id = The merge commit ID
pulls.require_signed_wont_sign = The branch requires signed commits but this merge will not be signed
-pulls.merge_pull_request_now = Merge Pull Request Now
-pulls.rebase_merge_pull_request_now = Rebase and Merge Now
-pulls.rebase_merge_commit_pull_request_now = Rebase and Merge Now (--no-ff)
-pulls.squash_merge_pull_request_now = Squash and Merge Now
-pulls.merge_pull_request_on_status_success = Merge Pull Request When All Checks Succeed
-pulls.rebase_merge_pull_request_on_status_success = Rebase and Merge When All Checks Succeed
-pulls.rebase_merge_commit_pull_request_on_status_success = Rebase and Merge (--no-ff) When All Checks Succeed
-pulls.squash_merge_pull_request_on_status_success = Squash and Merge When All Checks Succeed
+
pulls.invalid_merge_option = You cannot use this merge option for this pull request.
pulls.merge_conflict = Merge Failed: There was a conflict whilst merging. Hint: Try a different strategy
pulls.merge_conflict_summary = Error Message
@@ -1606,18 +1597,20 @@ pulls.reopened_at = `reopened this pull request %[2]
pulls.merge_instruction_hint = `You can also view command line instructions.`
pulls.merge_instruction_step1_desc = From your project repository, check out a new branch and test the changes.
pulls.merge_instruction_step2_desc = Merge the changes and update on Gitea.
-pulls.merge_on_status_success = The pull request was scheduled to merge when all checks succeed.
-pulls.merge_on_status_success_already_scheduled = This pull request is already scheduled to merge when all checks succeed.
-pulls.pr_has_pending_merge_on_success = %[1]s scheduled this pull request to auto merge when all checks succeed %[2]s.
-pulls.merge_pull_on_success_cancel = Cancel auto merge
-pulls.pull_request_not_scheduled = This pull request is not scheduled to auto merge.
-pulls.pull_request_schedule_canceled = The auto merge was canceled for this pull request.
-pulls.pull_request_scheduled_auto_merge = `scheduled this pull request to auto merge when all checks succeed %[1]s`
-pulls.pull_request_canceled_scheduled_auto_merge = `canceled auto merging this pull request when all checks succeed %[1]s`
+
+pulls.auto_merge_button_when_succeed = (When checks succeed)
+pulls.auto_merge_when_succeed = Auto merge when all checks succeed
+pulls.auto_merge_newly_scheduled = The pull request was scheduled to merge when all checks succeed.
+pulls.auto_merge_has_pending_schedule = %[1]s scheduled this pull request to auto merge when all checks succeed %[2]s.
+
+pulls.auto_merge_cancel_schedule = Cancel auto merge
+pulls.auto_merge_not_scheduled = This pull request is not scheduled to auto merge.
+pulls.auto_merge_canceled_schedule = The auto merge was canceled for this pull request.
+
+pulls.auto_merge_newly_scheduled_comment = `scheduled this pull request to auto merge when all checks succeed %[1]s`
+pulls.auto_merge_canceled_schedule_comment = `canceled auto merging this pull request when all checks succeed %[1]s`
milestones.new = New Milestone
-milestones.open_tab = %d Open
-milestones.close_tab = %d Closed
milestones.closed = Closed %s
milestones.update_ago = Updated %s ago
milestones.no_due_date = No due date
diff --git a/options/locale/locale_ja-JP.ini b/options/locale/locale_ja-JP.ini
index 24e3a564805b8..887f675810243 100644
--- a/options/locale/locale_ja-JP.ini
+++ b/options/locale/locale_ja-JP.ini
@@ -2,6 +2,7 @@ home=ホーム
dashboard=ダッシュボード
explore=エクスプローラー
help=ヘルプ
+logo=ロゴ
sign_in=サインイン
sign_in_with=こちらでサインイン
sign_out=サインアウト
@@ -716,6 +717,9 @@ generate_token_success=あなたの新しいトークンを生成しました。
generate_token_name_duplicate=アプリケーション名 %s は既に使われています。他の名前を使用してください。
delete_token=削除
access_token_deletion=アクセストークンの削除
+access_token_deletion_cancel_action=キャンセル
+access_token_deletion_confirm_action=削除
+access_token_deletion_desc=トークンを削除すると、それを使用しているアプリケーションは、アカウントへのアクセスができなくなります。これは元に戻せません。続行しますか?
delete_token_success=トークンを削除しました。 削除したトークンを使用しているアプリケーションは、今後あなたのアカウントにアクセスできません。
manage_oauth2_applications=OAuth2アプリケーションの管理
@@ -858,6 +862,7 @@ default_branch=デフォルトブランチ
default_branch_helper=デフォルトブランチはプルリクエストとコードコミットのベースブランチとなります。
mirror_prune=Prune
mirror_prune_desc=不要になった古いリモートトラッキング参照を削除
+mirror_interval=ミラー間隔 (有効な時間の単位は'h'、'm'、's')。 自動的な同期を無効にする場合は0。(最小間隔: %s)
mirror_interval_invalid=ミラー間隔が不正です。
mirror_address=クローンするURL
mirror_address_desc=必要な資格情報は「認証」セクションに設定してください。
@@ -1806,6 +1811,9 @@ settings.tracker_url_format_error=外部のイシュートラッカーのURLが
settings.tracker_issue_style=外部イシュートラッカーの番号形式
settings.tracker_issue_style.numeric=数値
settings.tracker_issue_style.alphanumeric=英数字
+settings.tracker_issue_style.regexp=正規表現
+settings.tracker_issue_style.regexp_pattern=正規表現パターン
+settings.tracker_issue_style.regexp_pattern_desc=最初のキャプチャグループが {index}
に使用されます。
settings.tracker_url_format_desc={user}
, {repo}
, {index}
を、ユーザー名、リポジトリ名、イシュー番号のプレースホルダ―として使用してください。
settings.enable_timetracker=タイムトラッキングを有効にする
settings.allow_only_contributors_to_track_time=コントリビューターだけタイムトラッキングする
@@ -2281,6 +2289,8 @@ topic.done=完了
topic.count_prompt=選択できるのは25トピックまでです。
topic.format_prompt=トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。
+find_file.go_to_file=ファイルへ移動
+find_file.no_matching=一致するファイルが見つかりません
error.csv.too_large=このファイルは大きすぎるため表示できません。
error.csv.unexpected=このファイルは %d 行目の %d 文字目に予期しない文字が含まれているため表示できません。
diff --git a/options/locale/locale_pt-PT.ini b/options/locale/locale_pt-PT.ini
index 7656f0c52b855..14a8d11dc3b1f 100644
--- a/options/locale/locale_pt-PT.ini
+++ b/options/locale/locale_pt-PT.ini
@@ -566,6 +566,7 @@ comment_type_group_branch=Ramo
comment_type_group_time_tracking=Contagem de tempo
comment_type_group_deadline=Prazo
comment_type_group_dependency=Dependência
+comment_type_group_lock=Estado do bloqueio
comment_type_group_review_request=Pedido de revisão
comment_type_group_pull_request_push=Cometimentos adicionados
comment_type_group_project=Planeamento
@@ -1810,6 +1811,9 @@ settings.tracker_url_format_error=O formato do URL do gestor de questões extern
settings.tracker_issue_style=Formato dos números do gestor de questões externo
settings.tracker_issue_style.numeric=Numérico
settings.tracker_issue_style.alphanumeric=Alfanumérico
+settings.tracker_issue_style.regexp=Expressão Regular
+settings.tracker_issue_style.regexp_pattern=Padrão da expressão regular
+settings.tracker_issue_style.regexp_pattern_desc=O primeiro grupo capturado será usado no lugar de {index}
.
settings.tracker_url_format_desc=Use os marcadores {user}
, {repo}
e {index}
para o nome de utilizador, nome do repositório e índice das questões.
settings.enable_timetracker=Habilitar a contagem de tempo
settings.allow_only_contributors_to_track_time=Permitir a contagem de tempo somente aos contribuidores
diff --git a/options/locale/locale_zh-CN.ini b/options/locale/locale_zh-CN.ini
index 2cc448282b484..1b00a2bb472fb 100644
--- a/options/locale/locale_zh-CN.ini
+++ b/options/locale/locale_zh-CN.ini
@@ -717,6 +717,9 @@ generate_token_success=新令牌生成成功。请拷贝因为令牌将只会显
generate_token_name_duplicate=%s 已被用作应用程序名称。请使用一个新的名称。
delete_token=删除令牌
access_token_deletion=删除 Access Token
+access_token_deletion_cancel_action=取消
+access_token_deletion_confirm_action=刪除
+access_token_deletion_desc=删除令牌将撤销程序对您账户的访问权限。此操作无法撤消。是否继续?
delete_token_success=令牌已经被删除。使用该令牌的应用将不再能够访问你的账号。
manage_oauth2_applications=管理 OAuth2 应用程序
@@ -1808,6 +1811,9 @@ settings.tracker_url_format_error=外部工单链接无效
settings.tracker_issue_style=外部工单管理系统的编号格式
settings.tracker_issue_style.numeric=纯数字形式
settings.tracker_issue_style.alphanumeric=英文字母数字组合形式
+settings.tracker_issue_style.regexp=正则表达式
+settings.tracker_issue_style.regexp_pattern=正则表达式模式
+settings.tracker_issue_style.regexp_pattern_desc=第一个被捕获的组将取代 {index}
。
settings.tracker_url_format_desc=使用占位符 {user}
, {repo}
和 {index}
作为用户名、仓库名和工单索引。
settings.enable_timetracker=启用时间跟踪
settings.allow_only_contributors_to_track_time=仅允许成员跟踪时间
@@ -2283,6 +2289,8 @@ topic.done=保存
topic.count_prompt=您最多选择25个主题
topic.format_prompt=主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符
+find_file.go_to_file=转到文件
+find_file.no_matching=没有找到匹配的文件
error.csv.too_large=无法渲染此文件,因为它太大了。
error.csv.unexpected=无法渲染此文件,因为它包含了意外字符,其位于第 %d 行和第 %d 列。
diff --git a/options/locale/locale_zh-TW.ini b/options/locale/locale_zh-TW.ini
index 8ce92f03c98c5..2cf099fda49b6 100644
--- a/options/locale/locale_zh-TW.ini
+++ b/options/locale/locale_zh-TW.ini
@@ -1789,6 +1789,9 @@ settings.tracker_url_format_error=該外部問題追蹤器 URL 格式無效。
settings.tracker_issue_style=外部問題追蹤器的編號格式
settings.tracker_issue_style.numeric=數字
settings.tracker_issue_style.alphanumeric=字母及數字
+settings.tracker_issue_style.regexp=正規表示式
+settings.tracker_issue_style.regexp_pattern=正規表示式模式
+settings.tracker_issue_style.regexp_pattern_desc=第一個捕捉到的群組會用來取代 {index}
。
settings.tracker_url_format_desc=使用占位符 {user}
, {repo}
和 {index}
代表帳號、儲存庫名稱和問題編號。
settings.enable_timetracker=啟用時間追蹤
settings.allow_only_contributors_to_track_time=只讓貢獻者追蹤時間
@@ -3000,4 +3003,6 @@ error.no_unit_allowed_repo=您未被允許存取此儲存庫的任何區域。
error.unit_not_allowed=您未被允許訪問此儲存庫區域
[packages]
+dependency.id=ID
+dependency.version=版本
diff --git a/routers/web/repo/migrate.go b/routers/web/repo/migrate.go
index 38cdbd49735d0..393f8ed3d9316 100644
--- a/routers/web/repo/migrate.go
+++ b/routers/web/repo/migrate.go
@@ -128,7 +128,7 @@ func handleMigrateRemoteAddrError(ctx *context.Context, err error, tpl base.TplN
case addrErr.IsProtocolInvalid:
ctx.RenderWithErr(ctx.Tr("repo.mirror_address_protocol_invalid"), tpl, form)
case addrErr.IsURLError:
- ctx.RenderWithErr(ctx.Tr("form.url_error"), tpl, form)
+ ctx.RenderWithErr(ctx.Tr("form.url_error", addrErr.Host), tpl, form)
case addrErr.IsPermissionDenied:
if addrErr.LocalPath {
ctx.RenderWithErr(ctx.Tr("repo.migrate.permission_denied"), tpl, form)
@@ -139,11 +139,11 @@ func handleMigrateRemoteAddrError(ctx *context.Context, err error, tpl base.TplN
ctx.RenderWithErr(ctx.Tr("repo.migrate.invalid_local_path"), tpl, form)
default:
log.Error("Error whilst updating url: %v", err)
- ctx.RenderWithErr(ctx.Tr("form.url_error"), tpl, form)
+ ctx.RenderWithErr(ctx.Tr("form.url_error", "unknown"), tpl, form)
}
} else {
log.Error("Error whilst updating url: %v", err)
- ctx.RenderWithErr(ctx.Tr("form.url_error"), tpl, form)
+ ctx.RenderWithErr(ctx.Tr("form.url_error", "unknown"), tpl, form)
}
}
diff --git a/routers/web/repo/pull.go b/routers/web/repo/pull.go
index 8df4ccc607862..d698f1c49a79a 100644
--- a/routers/web/repo/pull.go
+++ b/routers/web/repo/pull.go
@@ -20,6 +20,7 @@ import (
"code.gitea.io/gitea/models/db"
"code.gitea.io/gitea/models/organization"
access_model "code.gitea.io/gitea/models/perm/access"
+ pull_model "code.gitea.io/gitea/models/pull"
repo_model "code.gitea.io/gitea/models/repo"
"code.gitea.io/gitea/models/unit"
user_model "code.gitea.io/gitea/models/user"
@@ -36,6 +37,7 @@ import (
"code.gitea.io/gitea/modules/web/middleware"
"code.gitea.io/gitea/routers/utils"
asymkey_service "code.gitea.io/gitea/services/asymkey"
+ "code.gitea.io/gitea/services/automerge"
"code.gitea.io/gitea/services/forms"
"code.gitea.io/gitea/services/gitdiff"
pull_service "code.gitea.io/gitea/services/pull"
@@ -966,6 +968,22 @@ func MergePullRequest(ctx *context.Context) {
message += "\n\n" + form.MergeMessageField
}
+ if form.MergeWhenChecksSucceed {
+ // delete all scheduled auto merges
+ _ = pull_model.DeleteScheduledAutoMerge(ctx, pr.ID)
+ // schedule auto merge
+ scheduled, err := automerge.ScheduleAutoMerge(ctx, ctx.Doer, pr, repo_model.MergeStyle(form.Do), message)
+ if err != nil {
+ ctx.ServerError("ScheduleAutoMerge", err)
+ return
+ } else if scheduled {
+ // nothing more to do ...
+ ctx.Flash.Success(ctx.Tr("repo.pulls.auto_merge_newly_scheduled"))
+ ctx.Redirect(fmt.Sprintf("%s/pulls/%d", ctx.Repo.RepoLink, pr.Index))
+ return
+ }
+ }
+
if err := pull_service.Merge(ctx, pr, ctx.Doer, ctx.Repo.GitRepo, repo_model.MergeStyle(form.Do), form.HeadCommitID, message); err != nil {
if models.IsErrInvalidMergeStyle(err) {
ctx.Flash.Error(ctx.Tr("repo.pulls.invalid_merge_option"))
@@ -1070,6 +1088,26 @@ func MergePullRequest(ctx *context.Context) {
ctx.Redirect(issue.Link())
}
+// CancelAutoMergePullRequest cancels a scheduled pr
+func CancelAutoMergePullRequest(ctx *context.Context) {
+ issue := checkPullInfo(ctx)
+ if ctx.Written() {
+ return
+ }
+
+ if err := automerge.RemoveScheduledAutoMerge(ctx, ctx.Doer, issue.PullRequest); err != nil {
+ if db.IsErrNotExist(err) {
+ ctx.Flash.Error(ctx.Tr("repo.pulls.auto_merge_not_scheduled"))
+ ctx.Redirect(fmt.Sprintf("%s/pulls/%d", ctx.Repo.RepoLink, issue.Index))
+ return
+ }
+ ctx.ServerError("RemoveScheduledAutoMerge", err)
+ return
+ }
+ ctx.Flash.Success(ctx.Tr("repo.pulls.auto_merge_canceled_schedule"))
+ ctx.Redirect(fmt.Sprintf("%s/pulls/%d", ctx.Repo.RepoLink, issue.Index))
+}
+
func stopTimerIfAvailable(user *user_model.User, issue *models.Issue) error {
if models.StopwatchExists(user.ID, issue.ID) {
if err := models.CreateOrStopIssueStopwatch(user, issue); err != nil {
diff --git a/routers/web/repo/setting.go b/routers/web/repo/setting.go
index f49ef6e85d56a..fae62c102077c 100644
--- a/routers/web/repo/setting.go
+++ b/routers/web/repo/setting.go
@@ -57,8 +57,9 @@ const (
tplProtectedBranch base.TplName = "repo/settings/protected_branch"
)
-// Settings show a repository's settings page
-func Settings(ctx *context.Context) {
+// SettingsCtxData is a middleware that sets all the general context data for the
+// settings template.
+func SettingsCtxData(ctx *context.Context) {
ctx.Data["Title"] = ctx.Tr("repo.settings")
ctx.Data["PageIsSettingsOptions"] = true
ctx.Data["ForcePrivate"] = setting.Repository.ForcePrivate
@@ -94,15 +95,16 @@ func Settings(ctx *context.Context) {
return
}
ctx.Data["PushMirrors"] = pushMirrors
+}
+// Settings show a repository's settings page
+func Settings(ctx *context.Context) {
ctx.HTML(http.StatusOK, tplSettingsOptions)
}
// SettingsPost response for changes of a repository
func SettingsPost(ctx *context.Context) {
form := web.GetForm(ctx).(*forms.RepoSettingForm)
- ctx.Data["Title"] = ctx.Tr("repo.settings")
- ctx.Data["PageIsSettingsOptions"] = true
ctx.Data["ForcePrivate"] = setting.Repository.ForcePrivate
ctx.Data["MirrorsEnabled"] = setting.Mirror.Enabled
@@ -215,22 +217,24 @@ func SettingsPost(ctx *context.Context) {
return
}
- u, _ := git.GetRemoteAddress(ctx, ctx.Repo.Repository.RepoPath(), ctx.Repo.Mirror.GetRemoteName())
+ u, err := git.GetRemoteURL(ctx, ctx.Repo.Repository.RepoPath(), ctx.Repo.Mirror.GetRemoteName())
+ if err != nil {
+ ctx.Data["Err_MirrorAddress"] = true
+ handleSettingRemoteAddrError(ctx, err, form)
+ return
+ }
if u.User != nil && form.MirrorPassword == "" && form.MirrorUsername == u.User.Username() {
form.MirrorPassword, _ = u.User.Password()
}
- address, err := forms.ParseRemoteAddr(form.MirrorAddress, form.MirrorUsername, form.MirrorPassword)
- if err == nil {
- err = migrations.IsMigrateURLAllowed(address, ctx.Doer)
- }
+ err = migrations.IsMigrateURLAllowed(u.String(), ctx.Doer)
if err != nil {
ctx.Data["Err_MirrorAddress"] = true
handleSettingRemoteAddrError(ctx, err, form)
return
}
- if err := mirror_service.UpdateAddress(ctx, ctx.Repo.Mirror, address); err != nil {
+ if err := mirror_service.UpdateAddress(ctx, ctx.Repo.Mirror, u.String()); err != nil {
ctx.ServerError("UpdateAddress", err)
return
}
@@ -825,7 +829,7 @@ func handleSettingRemoteAddrError(ctx *context.Context, err error, form *forms.R
case addrErr.IsProtocolInvalid:
ctx.RenderWithErr(ctx.Tr("repo.mirror_address_protocol_invalid"), tplSettingsOptions, form)
case addrErr.IsURLError:
- ctx.RenderWithErr(ctx.Tr("form.url_error"), tplSettingsOptions, form)
+ ctx.RenderWithErr(ctx.Tr("form.url_error", addrErr.Host), tplSettingsOptions, form)
case addrErr.IsPermissionDenied:
if addrErr.LocalPath {
ctx.RenderWithErr(ctx.Tr("repo.migrate.permission_denied"), tplSettingsOptions, form)
diff --git a/routers/web/web.go b/routers/web/web.go
index bf4c4662afd7c..ad005f74df4d7 100644
--- a/routers/web/web.go
+++ b/routers/web/web.go
@@ -126,7 +126,7 @@ func Routes() *web.Route {
routes.Route("/avatars/*", "GET, HEAD", storageHandler(setting.Avatar.Storage, "avatars", storage.Avatars))
routes.Route("/repo-avatars/*", "GET, HEAD", storageHandler(setting.RepoAvatar.Storage, "repo-avatars", storage.RepoAvatars))
- // for health check - doeesn't need to be passed through gzip handler
+ // for health check - doesn't need to be passed through gzip handler
routes.Head("/", func(w http.ResponseWriter, req *http.Request) {
w.WriteHeader(http.StatusOK)
})
@@ -730,8 +730,10 @@ func RegisterRoutes(m *web.Route) {
m.Group("/{username}/{reponame}", func() {
m.Group("/settings", func() {
- m.Combo("").Get(repo.Settings).
- Post(bindIgnErr(forms.RepoSettingForm{}), repo.SettingsPost)
+ m.Group("", func() {
+ m.Combo("").Get(repo.Settings).
+ Post(bindIgnErr(forms.RepoSettingForm{}), repo.SettingsPost)
+ }, repo.SettingsCtxData)
m.Post("/avatar", bindIgnErr(forms.AvatarForm{}), repo.SettingsAvatar)
m.Post("/avatar/delete", repo.SettingsDeleteAvatar)
@@ -1127,6 +1129,7 @@ func RegisterRoutes(m *web.Route) {
m.Get(".patch", repo.DownloadPullPatch)
m.Get("/commits", context.RepoRef(), repo.ViewPullCommits)
m.Post("/merge", context.RepoMustNotBeArchived(), bindIgnErr(forms.MergePullRequestForm{}), repo.MergePullRequest)
+ m.Post("/cancel_auto_merge", context.RepoMustNotBeArchived(), repo.CancelAutoMergePullRequest)
m.Post("/update", repo.UpdatePullRequest)
m.Post("/set_allow_maintainer_edit", bindIgnErr(forms.UpdateAllowEditsForm{}), repo.SetAllowEdits)
m.Post("/cleanup", context.RepoMustNotBeArchived(), context.RepoRef(), repo.CleanUpPullRequest)
diff --git a/services/forms/repo_form.go b/services/forms/repo_form.go
index 738a77d2bbc99..23ac1abe3c286 100644
--- a/services/forms/repo_form.go
+++ b/services/forms/repo_form.go
@@ -101,7 +101,7 @@ func ParseRemoteAddr(remoteAddr, authUsername, authPassword string) (string, err
strings.HasPrefix(remoteAddr, "git://") {
u, err := url.Parse(remoteAddr)
if err != nil {
- return "", &models.ErrInvalidCloneAddr{IsURLError: true}
+ return "", &models.ErrInvalidCloneAddr{IsURLError: true, Host: remoteAddr}
}
if len(authUsername)+len(authPassword) > 0 {
u.User = url.UserPassword(authUsername, authPassword)
diff --git a/services/migrations/migrate.go b/services/migrations/migrate.go
index 700f06af35dc0..ce76733bd51a8 100644
--- a/services/migrations/migrate.go
+++ b/services/migrations/migrate.go
@@ -44,7 +44,7 @@ func IsMigrateURLAllowed(remoteURL string, doer *user_model.User) error {
// Remote address can be HTTP/HTTPS/Git URL or local path.
u, err := url.Parse(remoteURL)
if err != nil {
- return &models.ErrInvalidCloneAddr{IsURLError: true}
+ return &models.ErrInvalidCloneAddr{IsURLError: true, Host: remoteURL}
}
if u.Scheme == "file" || u.Scheme == "" {
diff --git a/services/mirror/mirror_pull.go b/services/mirror/mirror_pull.go
index caa81f0fe9852..f4c527bbdc226 100644
--- a/services/mirror/mirror_pull.go
+++ b/services/mirror/mirror_pull.go
@@ -210,9 +210,10 @@ func runSync(ctx context.Context, m *repo_model.Mirror) ([]*mirrorSyncResult, bo
}
gitArgs = append(gitArgs, m.GetRemoteName())
- remoteAddr, remoteErr := git.GetRemoteAddress(ctx, repoPath, m.GetRemoteName())
+ remoteURL, remoteErr := git.GetRemoteURL(ctx, repoPath, m.GetRemoteName())
if remoteErr != nil {
log.Error("SyncMirrors [repo: %-v]: GetRemoteAddress Error %v", m.Repo, remoteErr)
+ return nil, false
}
stdoutBuilder := strings.Builder{}
@@ -291,7 +292,7 @@ func runSync(ctx context.Context, m *repo_model.Mirror) ([]*mirrorSyncResult, bo
if m.LFS && setting.LFS.StartServer {
log.Trace("SyncMirrors [repo: %-v]: syncing LFS objects...", m.Repo)
- endpoint := lfs.DetermineEndpoint(remoteAddr.String(), m.LFSEndpoint)
+ endpoint := lfs.DetermineEndpoint(remoteURL.String(), m.LFSEndpoint)
lfsClient := lfs.NewClient(endpoint, nil)
if err = repo_module.StoreMissingLfsObjectsInRepository(ctx, m.Repo, gitRepo, lfsClient); err != nil {
log.Error("SyncMirrors [repo: %-v]: failed to synchronize LFS objects for repository: %v", m.Repo, err)
diff --git a/services/mirror/mirror_push.go b/services/mirror/mirror_push.go
index 138ebb737b235..2927bed72b279 100644
--- a/services/mirror/mirror_push.go
+++ b/services/mirror/mirror_push.go
@@ -131,7 +131,7 @@ func runPushSync(ctx context.Context, m *repo_model.PushMirror) error {
timeout := time.Duration(setting.Git.Timeout.Mirror) * time.Second
performPush := func(path string) error {
- remoteAddr, err := git.GetRemoteAddress(ctx, path, m.RemoteName)
+ remoteURL, err := git.GetRemoteURL(ctx, path, m.RemoteName)
if err != nil {
log.Error("GetRemoteAddress(%s) Error %v", path, err)
return errors.New("Unexpected error")
@@ -147,7 +147,7 @@ func runPushSync(ctx context.Context, m *repo_model.PushMirror) error {
}
defer gitRepo.Close()
- endpoint := lfs.DetermineEndpoint(remoteAddr.String(), "")
+ endpoint := lfs.DetermineEndpoint(remoteURL.String(), "")
lfsClient := lfs.NewClient(endpoint, nil)
if err := pushAllLFSObjects(ctx, gitRepo, lfsClient); err != nil {
return util.SanitizeErrorCredentialURLs(err)
diff --git a/templates/repo/header.tmpl b/templates/repo/header.tmpl
index 2d963d67c8974..cfac37cd115b0 100644
--- a/templates/repo/header.tmpl
+++ b/templates/repo/header.tmpl
@@ -37,7 +37,9 @@
{{end}}
- {{if .IsMirror}}