{index}
.
settings.tracker_url_format_desc = Use the placeholders {user}
, {repo}
and {index}
for the username, repository name and issue index.
settings.enable_timetracker = Enable Time Tracking
settings.allow_only_contributors_to_track_time = Let Only Contributors Track Time
diff --git a/options/locale/locale_es-ES.ini b/options/locale/locale_es-ES.ini
index 5c98da03b9..a35cffe495 100644
--- a/options/locale/locale_es-ES.ini
+++ b/options/locale/locale_es-ES.ini
@@ -2198,6 +2198,7 @@ topic.done=Hecho
topic.count_prompt=No puede seleccionar más de 25 temas
topic.format_prompt=Los temas deben comenzar con una letra o número, pueden incluir guiones ('-') y pueden tener hasta 35 caracteres de largo.
+
error.csv.too_large=No se puede renderizar este archivo porque es demasiado grande.
error.csv.unexpected=No se puede procesar este archivo porque contiene un carácter inesperado en la línea %d y la columna %d.
error.csv.invalid_field_count=No se puede procesar este archivo porque tiene un número incorrecto de campos en la línea %d.
diff --git a/options/locale/locale_fa-IR.ini b/options/locale/locale_fa-IR.ini
index a465c00145..9cf067a010 100644
--- a/options/locale/locale_fa-IR.ini
+++ b/options/locale/locale_fa-IR.ini
@@ -2110,6 +2110,7 @@ topic.done=انجام شد
topic.count_prompt=شما نمی توانید بیش از 25 موضوع انتخاب کنید
topic.format_prompt=موضوع میبایستی با حروف یا شماره ها شروع شود. و میتواند شامل دَش ('-') باشد و طول آن تا 35 کارکتر نیز امکانپذیر است.
+
error.csv.too_large=نمی توان این فایل را رندر کرد زیرا بسیار بزرگ است.
error.csv.unexpected=نمی توان این فایل را رندر کرد زیرا حاوی یک کاراکتر غیرمنتظره در خط %d و ستون %d است.
error.csv.invalid_field_count=نمی توان این فایل را رندر کرد زیرا تعداد فیلدهای آن در خط %d اشتباه است.
diff --git a/options/locale/locale_fi-FI.ini b/options/locale/locale_fi-FI.ini
index da96086cdc..bad4b505f7 100644
--- a/options/locale/locale_fi-FI.ini
+++ b/options/locale/locale_fi-FI.ini
@@ -971,6 +971,7 @@ topic.manage_topics=Hallitse aiheita
topic.done=Valmis
+
[org]
org_name_holder=Organisaatio
org_full_name_holder=Organisaation täydellinen nimi
diff --git a/options/locale/locale_fr-FR.ini b/options/locale/locale_fr-FR.ini
index 4ee872901c..667205e06b 100644
--- a/options/locale/locale_fr-FR.ini
+++ b/options/locale/locale_fr-FR.ini
@@ -1973,6 +1973,7 @@ topic.count_prompt=Vous ne pouvez pas sélectionner plus de 25 sujets
topic.format_prompt=Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.
+
[org]
org_name_holder=Nom de l'organisation
org_full_name_holder=Nom complet de l'organisation
diff --git a/options/locale/locale_hu-HU.ini b/options/locale/locale_hu-HU.ini
index 790f11faf5..3c58383cc9 100644
--- a/options/locale/locale_hu-HU.ini
+++ b/options/locale/locale_hu-HU.ini
@@ -1305,6 +1305,7 @@ topic.manage_topics=Témák kezelése
topic.done=Kész
+
[org]
org_name_holder=Szervezet neve
org_full_name_holder=Szervezet teljes neve
diff --git a/options/locale/locale_id-ID.ini b/options/locale/locale_id-ID.ini
index 8d49ce2ac1..41a9e84ad7 100644
--- a/options/locale/locale_id-ID.ini
+++ b/options/locale/locale_id-ID.ini
@@ -1019,6 +1019,7 @@ branch.deleted_by=Dihapus oleh %s
+
[org]
org_name_holder=Nama Organisasi
org_full_name_holder=Organisasi Nama Lengkap
diff --git a/options/locale/locale_is-IS.ini b/options/locale/locale_is-IS.ini
index 2d0b62507f..b28196e80c 100644
--- a/options/locale/locale_is-IS.ini
+++ b/options/locale/locale_is-IS.ini
@@ -1131,6 +1131,7 @@ tag.confirm_create_tag=Skapa merki
topic.done=Í lagi
+
[org]
repo_updated=Uppfært
people=Fólk
diff --git a/options/locale/locale_it-IT.ini b/options/locale/locale_it-IT.ini
index 0335f10449..a6bd6ad1bb 100644
--- a/options/locale/locale_it-IT.ini
+++ b/options/locale/locale_it-IT.ini
@@ -1781,6 +1781,7 @@ topic.count_prompt=Non puoi selezionare più di 25 argomenti
topic.format_prompt=Gli argomenti devono iniziare con una lettera o un numero, possono includere trattini ('-') e possono essere lunghi fino a 35 caratteri.
+
[org]
org_name_holder=Nome dell'Organizzazione
org_full_name_holder=Nome completo dell'organizzazione
diff --git a/options/locale/locale_ja-JP.ini b/options/locale/locale_ja-JP.ini
index 3699ac37b3..24e3a56480 100644
--- a/options/locale/locale_ja-JP.ini
+++ b/options/locale/locale_ja-JP.ini
@@ -2281,6 +2281,7 @@ topic.done=完了
topic.count_prompt=選択できるのは25トピックまでです。
topic.format_prompt=トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。
+
error.csv.too_large=このファイルは大きすぎるため表示できません。
error.csv.unexpected=このファイルは %d 行目の %d 文字目に予期しない文字が含まれているため表示できません。
error.csv.invalid_field_count=このファイルは %d 行目のフィールドの数が正しくないため表示できません。
diff --git a/options/locale/locale_ko-KR.ini b/options/locale/locale_ko-KR.ini
index 625c31a5c7..ed48ada226 100644
--- a/options/locale/locale_ko-KR.ini
+++ b/options/locale/locale_ko-KR.ini
@@ -1173,6 +1173,7 @@ topic.done=완료
topic.count_prompt=25개 이상의 토픽을 선택하실 수 없습니다.
+
[org]
org_name_holder=조직 이름
org_full_name_holder=조직 전체 이름
diff --git a/options/locale/locale_lv-LV.ini b/options/locale/locale_lv-LV.ini
index 537c04d3d8..13aea77c79 100644
--- a/options/locale/locale_lv-LV.ini
+++ b/options/locale/locale_lv-LV.ini
@@ -2186,6 +2186,7 @@ topic.done=Gatavs
topic.count_prompt=Nevar pievienot vairāk kā 25 tēmas
topic.format_prompt=Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.
+
error.csv.too_large=Nevar attēlot šo failu, jo tas ir pārāk liels.
error.csv.unexpected=Nevar attēlot šo failu, jo tas satur neparedzētu simbolu %d. līnijas %d. kolonnā.
error.csv.invalid_field_count=Nevar attēlot šo failu, jo tas satur nepareizu skaitu ar laukiem %d. līnijā.
diff --git a/options/locale/locale_ml-IN.ini b/options/locale/locale_ml-IN.ini
index ece816f891..285c7e8e4b 100644
--- a/options/locale/locale_ml-IN.ini
+++ b/options/locale/locale_ml-IN.ini
@@ -746,6 +746,7 @@ settings.event_issues=ഇഷ്യൂകള്
+
[org]
diff --git a/options/locale/locale_nl-NL.ini b/options/locale/locale_nl-NL.ini
index efdd4e632b..66c3fee81b 100644
--- a/options/locale/locale_nl-NL.ini
+++ b/options/locale/locale_nl-NL.ini
@@ -1833,6 +1833,7 @@ topic.count_prompt=Je kunt niet meer dan 25 onderwerpen selecteren
topic.format_prompt=Onderwerpen moeten beginnen met een letter of nummer, kunnen streepjes bevatten ('-') en kunnen maximaal 35 tekens lang zijn.
+
[org]
org_name_holder=Organisatienaam
org_full_name_holder=Volledige naam organisatie
diff --git a/options/locale/locale_pl-PL.ini b/options/locale/locale_pl-PL.ini
index db96b31126..2bbf821664 100644
--- a/options/locale/locale_pl-PL.ini
+++ b/options/locale/locale_pl-PL.ini
@@ -2056,6 +2056,7 @@ topic.done=Gotowe
topic.count_prompt=Nie możesz wybrać więcej, niż 25 tematów
topic.format_prompt=Tematy muszą się zaczynać od litery lub cyfry, mogą zawierać myślniki ('-') i mogą mieć do 35 znaków.
+
error.csv.too_large=Nie można wyświetlić tego pliku, ponieważ jest on zbyt duży.
error.csv.unexpected=Nie można renderować tego pliku, ponieważ zawiera nieoczekiwany znak w wierszu %d i kolumnie %d.
error.csv.invalid_field_count=Nie można renderować tego pliku, ponieważ ma nieprawidłową liczbę pól w wierszu %d.
diff --git a/options/locale/locale_pt-BR.ini b/options/locale/locale_pt-BR.ini
index 7094e07347..658d1f4355 100644
--- a/options/locale/locale_pt-BR.ini
+++ b/options/locale/locale_pt-BR.ini
@@ -2268,6 +2268,7 @@ topic.done=Feito
topic.count_prompt=Você não pode selecionar mais de 25 tópicos
topic.format_prompt=Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.
+
error.csv.too_large=Não é possível renderizar este arquivo porque ele é muito grande.
error.csv.unexpected=Não é possível renderizar este arquivo porque ele contém um caractere inesperado na linha %d e coluna %d.
error.csv.invalid_field_count=Não é possível renderizar este arquivo porque ele tem um número errado de campos na linha %d.
diff --git a/options/locale/locale_pt-PT.ini b/options/locale/locale_pt-PT.ini
index e675de4bae..7656f0c52b 100644
--- a/options/locale/locale_pt-PT.ini
+++ b/options/locale/locale_pt-PT.ini
@@ -2285,6 +2285,9 @@ topic.done=Concluído
topic.count_prompt=Não pode escolher mais do que 25 tópicos
topic.format_prompt=Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.
+find_file.go_to_file=Ir para o ficheiro
+find_file.no_matching=Não foi encontrado qualquer ficheiro correspondente
+
error.csv.too_large=Não é possível apresentar este ficheiro por ser demasiado grande.
error.csv.unexpected=Não é possível apresentar este ficheiro porque contém um caractere inesperado na linha %d e coluna %d.
error.csv.invalid_field_count=Não é possível apresentar este ficheiro porque tem um número errado de campos na linha %d.
diff --git a/options/locale/locale_ru-RU.ini b/options/locale/locale_ru-RU.ini
index 2d99b043f9..377ef1cb31 100644
--- a/options/locale/locale_ru-RU.ini
+++ b/options/locale/locale_ru-RU.ini
@@ -2203,6 +2203,7 @@ topic.done=Сохранить
topic.count_prompt=Вы не можете выбрать более 25 тем
topic.format_prompt=Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.
+
error.csv.too_large=Не удается отобразить этот файл, потому что он слишком большой.
error.csv.unexpected=Не удается отобразить этот файл, потому что он содержит неожиданный символ в строке %d и столбце %d.
error.csv.invalid_field_count=Не удается отобразить этот файл, потому что он имеет неправильное количество полей в строке %d.
diff --git a/options/locale/locale_si-LK.ini b/options/locale/locale_si-LK.ini
index 460d61c7c4..397a851821 100644
--- a/options/locale/locale_si-LK.ini
+++ b/options/locale/locale_si-LK.ini
@@ -2046,6 +2046,7 @@ topic.done=සිදු
topic.count_prompt=ඔබට 25 මාතෘකා වලට වඩා තෝරා ගත නොහැක
topic.format_prompt=මාතෘකා අකුරකින් හෝ අංකයකින් ආරම්භ කළ යුතුය, දෂ්ට කිරීම් ඇතුළත් කළ හැකිය ('-') සහ අක්ෂර 35 ක් දිගු විය හැකිය.
+
error.csv.too_large=එය ඉතා විශාල නිසා මෙම ගොනුව විදැහුම්කරණය කළ නොහැක.
error.csv.unexpected=%d පේළියේ සහ %dතීරුවේ අනපේක්ෂිත චරිතයක් අඩංගු බැවින් මෙම ගොනුව විදැහුම්කරණය කළ නොහැක.
error.csv.invalid_field_count=මෙම ගොනුව රේඛාවේ වැරදි ක්ෂේත්ර සංඛ්යාවක් ඇති බැවින් එය විදැහුම්කරණය කළ නොහැක %d.
diff --git a/options/locale/locale_sv-SE.ini b/options/locale/locale_sv-SE.ini
index 1afca6b778..25bb0aeff2 100644
--- a/options/locale/locale_sv-SE.ini
+++ b/options/locale/locale_sv-SE.ini
@@ -1619,6 +1619,7 @@ topic.count_prompt=Du kan inte välja fler än 25 ämnen
topic.format_prompt=Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.
+
[org]
org_name_holder=Organisationsnamn
org_full_name_holder=Organisationens Fullständiga Namn
diff --git a/options/locale/locale_tr-TR.ini b/options/locale/locale_tr-TR.ini
index 6cabad7a69..c7bdb9fc65 100644
--- a/options/locale/locale_tr-TR.ini
+++ b/options/locale/locale_tr-TR.ini
@@ -2057,6 +2057,7 @@ topic.done=Bitti
topic.count_prompt=25'ten fazla konu seçemezsiniz
topic.format_prompt=Konular bir harf veya rakamla başlamalı, kısa çizgiler ('-') içerebilir ve en fazla 35 karakter uzunluğunda olabilir.
+
error.csv.too_large=Bu dosya çok büyük olduğu için işlenemiyor.
error.csv.unexpected=%d satırı ve %d sütununda beklenmeyen bir karakter içerdiğinden bu dosya işlenemiyor.
error.csv.invalid_field_count=%d satırında yanlış sayıda alan olduğundan bu dosya işlenemiyor.
diff --git a/options/locale/locale_uk-UA.ini b/options/locale/locale_uk-UA.ini
index 791a3bc105..3e83932a2d 100644
--- a/options/locale/locale_uk-UA.ini
+++ b/options/locale/locale_uk-UA.ini
@@ -2118,6 +2118,7 @@ topic.done=Готово
topic.count_prompt=Ви не можете вибрати більше 25 тем
topic.format_prompt=Теми мають розпочинатися з літери або цифри, можуть містити дефіси (-) і не повинні перевищувати 35 символів.
+
error.csv.too_large=Не вдається відобразити цей файл, тому що він завеликий.
error.csv.unexpected=Не вдається відобразити цей файл, тому що він містить неочікуваний символ в рядку %d і стовпці %d.
error.csv.invalid_field_count=Не вдається відобразити цей файл, тому що він має неправильну кількість полів у рядку %d.
diff --git a/options/locale/locale_zh-CN.ini b/options/locale/locale_zh-CN.ini
index 0f28fa8f34..2cc448282b 100644
--- a/options/locale/locale_zh-CN.ini
+++ b/options/locale/locale_zh-CN.ini
@@ -2283,6 +2283,7 @@ topic.done=保存
topic.count_prompt=您最多选择25个主题
topic.format_prompt=主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符
+
error.csv.too_large=无法渲染此文件,因为它太大了。
error.csv.unexpected=无法渲染此文件,因为它包含了意外字符,其位于第 %d 行和第 %d 列。
error.csv.invalid_field_count=无法渲染此文件,因为它在第 %d 行中的字段数有误。
diff --git a/options/locale/locale_zh-HK.ini b/options/locale/locale_zh-HK.ini
index b12fda1600..97d3b8984c 100644
--- a/options/locale/locale_zh-HK.ini
+++ b/options/locale/locale_zh-HK.ini
@@ -559,6 +559,7 @@ release.downloads=下載附件
+
[org]
org_name_holder=組織名稱
org_full_name_holder=組織全名
diff --git a/options/locale/locale_zh-TW.ini b/options/locale/locale_zh-TW.ini
index ef478990f5..8ce92f03c9 100644
--- a/options/locale/locale_zh-TW.ini
+++ b/options/locale/locale_zh-TW.ini
@@ -715,6 +715,9 @@ generate_token_success=已經產生新的 Token。請立刻複製它,因為他
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=刪除 Token 後,使用此 Token 的應用程式將無法再存取您的帳戶,此動作不可還原。是否繼續?
delete_token_success=已刪除 Token。使用此 Token 的應用程式無法再存取您的帳戶。
manage_oauth2_applications=管理 OAuth2 應用程式
@@ -857,6 +860,7 @@ default_branch=預設分支
default_branch_helper=預設分支是合併請求和提交程式碼的基礎分支。
mirror_prune=裁減
mirror_prune_desc=刪除過時的遠端追蹤參考
+mirror_interval=鏡像間隔 (有效時間單位為 'h'、'm'、's'),設為 0 以停用自動同步。(最小間隔: %s)
mirror_interval_invalid=鏡像週期無效
mirror_address=從 URL Clone
mirror_address_desc=在授權資訊中填入必要的資料。
@@ -1856,7 +1860,7 @@ settings.confirm_wiki_delete=刪除 Wiki 資料
settings.wiki_deletion_success=已刪除儲存庫的 Wiki 資料。
settings.delete=刪除本儲存庫
settings.delete_desc=刪除儲存庫是永久的且不可還原。
-settings.delete_notices_1=- 此操作不可還原。
+settings.delete_notices_1=- 此動作不可還原。
settings.delete_notices_2=- 此操作將永久刪除 %s 儲存庫,包括程式碼、問題、留言、Wiki 資料和協作者設定。
settings.delete_notices_fork_1=- 在此儲存庫刪除後,它的 fork 將會變成獨立儲存庫。
settings.deletion_success=這個儲存庫已被刪除。
@@ -2257,6 +2261,9 @@ 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 列。
error.csv.invalid_field_count=無法渲染此檔案,因為它第 %d 行的欄位數量有誤。
diff --git a/routers/init.go b/routers/init.go
index 9b6a770f27..2898c44607 100644
--- a/routers/init.go
+++ b/routers/init.go
@@ -102,7 +102,7 @@ func GlobalInitInstalled(ctx context.Context) {
log.Fatal("Gitea is not installed")
}
- mustInitCtx(ctx, git.InitWithConfigSync)
+ mustInitCtx(ctx, git.InitOnceWithSync)
log.Info("Git Version: %s (home: %s)", git.VersionInfo(), git.HomeDir())
git.CheckLFSVersion()
diff --git a/routers/web/repo/pull.go b/routers/web/repo/pull.go
index 8df4ccc607..d698f1c49a 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 1a7a41ae91..6083d17fa5 100644
--- a/routers/web/repo/setting.go
+++ b/routers/web/repo/setting.go
@@ -215,22 +215,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
}
@@ -434,9 +436,10 @@ func SettingsPost(ctx *context.Context) {
RepoID: repo.ID,
Type: unit_model.TypeExternalTracker,
Config: &repo_model.ExternalTrackerConfig{
- ExternalTrackerURL: form.ExternalTrackerURL,
- ExternalTrackerFormat: form.TrackerURLFormat,
- ExternalTrackerStyle: form.TrackerIssueStyle,
+ ExternalTrackerURL: form.ExternalTrackerURL,
+ ExternalTrackerFormat: form.TrackerURLFormat,
+ ExternalTrackerStyle: form.TrackerIssueStyle,
+ ExternalTrackerRegexpPattern: form.ExternalTrackerRegexpPattern,
},
})
deleteUnitTypes = append(deleteUnitTypes, unit_model.TypeIssues)
diff --git a/routers/web/web.go b/routers/web/web.go
index bf4c4662af..88a446d067 100644
--- a/routers/web/web.go
+++ b/routers/web/web.go
@@ -1127,6 +1127,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 2bcb91f8c3..738a77d2bb 100644
--- a/services/forms/repo_form.go
+++ b/services/forms/repo_form.go
@@ -141,6 +141,7 @@ type RepoSettingForm struct {
ExternalTrackerURL string
TrackerURLFormat string
TrackerIssueStyle string
+ ExternalTrackerRegexpPattern string
EnableCloseIssuesViaCommitInAnyBranch bool
EnableProjects bool
EnablePackages bool
diff --git a/services/mirror/mirror_pull.go b/services/mirror/mirror_pull.go
index caa81f0fe9..f4c527bbdc 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 138ebb737b..2927bed72b 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 2d963d67c8..cfac37cd11 100644
--- a/templates/repo/header.tmpl
+++ b/templates/repo/header.tmpl
@@ -37,7 +37,9 @@
{{end}}
- {{if .IsMirror}}{{.i18n.Tr "repo.settings.tracker_issue_style.regexp_pattern_desc" | Str2html}}