From 8fd8978b4934865c2b041216e84e923ad574a4c7 Mon Sep 17 00:00:00 2001
From: silverwind
Date: Sat, 13 Apr 2024 09:46:02 +0200
Subject: [PATCH 001/556] Fix admin notice view-detail (#30450)
Fix https://github.com/go-gitea/gitea/issues/30434, regression from
https://github.com/go-gitea/gitea/pull/30115.
I also removed the date insertion into the modal which was also broken
since that date was switched to `absolute-date` because I see no real
purpose to putting that date into the modal.
Result:
---
templates/admin/notice.tmpl | 5 +----
web_src/js/features/admin/common.js | 8 ++++----
2 files changed, 5 insertions(+), 8 deletions(-)
diff --git a/templates/admin/notice.tmpl b/templates/admin/notice.tmpl
index 5ea003e5ec..33d8a2f963 100644
--- a/templates/admin/notice.tmpl
+++ b/templates/admin/notice.tmpl
@@ -62,10 +62,7 @@
- {{svg "octicon-x" 16}} button with very very very very very very very very long text
+ {{svg "octicon-x" 16}} button with very very very very very very very very long text
+ basic label
+ basic red label
+ basic green label
+
+
+ long content must be in a non-flex "gt-ellipsis" element, otherwise it won't get ellipsis. very looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong label
+
+
+ very looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong label
+
+
+ very looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong label
+
+
+
+{{template "base/footer" .}}
diff --git a/web_src/css/base.css b/web_src/css/base.css
index b3f87044e0..8ded4aa883 100644
--- a/web_src/css/base.css
+++ b/web_src/css/base.css
@@ -1341,6 +1341,7 @@ table th[data-sortt-desc] .svg {
align-items: center;
gap: .25rem;
vertical-align: middle;
+ min-width: 0;
}
.ui.dropdown .ui.label .svg {
@@ -1357,6 +1358,7 @@ table th[data-sortt-desc] .svg {
display: flex;
align-items: center;
gap: .25rem;
+ min-width: 0;
}
/* to override Fomantic's default display: block for ".menu .item", and use a slightly larger gap for menu item content */
@@ -1364,4 +1366,5 @@ table th[data-sortt-desc] .svg {
display: flex !important;
align-items: center;
gap: .5rem;
+ min-width: 0;
}
diff --git a/web_src/css/modules/label.css b/web_src/css/modules/label.css
index 32e772ea5b..696080b667 100644
--- a/web_src/css/modules/label.css
+++ b/web_src/css/modules/label.css
@@ -5,6 +5,8 @@
display: inline-flex;
align-items: center;
gap: .25rem;
+ min-width: 0;
+ max-width: 100%; /* since we are using "flex" to align label contents, we also need to limit the x-axis, a label shouldn't be wider than 100% */
vertical-align: middle;
line-height: 1;
background: var(--color-label-bg);
From ef3941f2ebe9d8353f9546e7df00b24092c71cb7 Mon Sep 17 00:00:00 2001
From: silverwind
Date: Mon, 15 Apr 2024 03:04:02 +0200
Subject: [PATCH 019/556] Revert 100% label max-width (#30481)
Partial revert of https://github.com/go-gitea/gitea/pull/30479
It's causing problems at least here:
https://github.com/go-gitea/gitea/pull/30344#discussion_r1564895591
---------
Co-authored-by: wxiaoguang
---
templates/devtest/label.tmpl | 2 +-
web_src/css/modules/label.css | 1 -
2 files changed, 1 insertion(+), 2 deletions(-)
diff --git a/templates/devtest/label.tmpl b/templates/devtest/label.tmpl
index 77590715a1..c4b52a3e23 100644
--- a/templates/devtest/label.tmpl
+++ b/templates/devtest/label.tmpl
@@ -20,7 +20,7 @@
very looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong label
- very looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong label
+ very looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong label
diff --git a/web_src/css/modules/label.css b/web_src/css/modules/label.css
index 696080b667..2032b2c84b 100644
--- a/web_src/css/modules/label.css
+++ b/web_src/css/modules/label.css
@@ -6,7 +6,6 @@
align-items: center;
gap: .25rem;
min-width: 0;
- max-width: 100%; /* since we are using "flex" to align label contents, we also need to limit the x-axis, a label shouldn't be wider than 100% */
vertical-align: middle;
line-height: 1;
background: var(--color-label-bg);
From 708e87e17df2b6a03eca3cac026a51beed296b5b Mon Sep 17 00:00:00 2001
From: GiteaBot
Date: Mon, 15 Apr 2024 02:40:53 +0000
Subject: [PATCH 020/556] [skip ci] Updated licenses and gitignores
---
options/license/BSD-2-clause-first-lines | 27 ++++++++++++++++++++++++
options/license/Sun-PPP-2000 | 13 ++++++++++++
options/license/pkgconf | 7 ++++++
3 files changed, 47 insertions(+)
create mode 100644 options/license/BSD-2-clause-first-lines
create mode 100644 options/license/Sun-PPP-2000
create mode 100644 options/license/pkgconf
diff --git a/options/license/BSD-2-clause-first-lines b/options/license/BSD-2-clause-first-lines
new file mode 100644
index 0000000000..3774caf24a
--- /dev/null
+++ b/options/license/BSD-2-clause-first-lines
@@ -0,0 +1,27 @@
+Copyright (C) 2006,2007,2009 NTT (Nippon Telegraph and Telephone
+Corporation). All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+
+1. Redistributions of source code must retain the above
+ copyright notice, this list of conditions and the following
+ disclaimer as the first lines of this file unmodified.
+
+2. Redistributions in binary form must reproduce the above
+ copyright notice, this list of conditions and the following
+ disclaimer in the documentation and/or other materials provided
+ with the distribution.
+
+THIS SOFTWARE IS PROVIDED BY NTT "AS IS" AND ANY EXPRESS OR IMPLIED
+WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+DISCLAIMED. IN NO EVENT SHALL NTT BE LIABLE FOR ANY DIRECT,
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
+OF THE POSSIBILITY OF SUCH DAMAGE.
diff --git a/options/license/Sun-PPP-2000 b/options/license/Sun-PPP-2000
new file mode 100644
index 0000000000..914c19544a
--- /dev/null
+++ b/options/license/Sun-PPP-2000
@@ -0,0 +1,13 @@
+Copyright (c) 2000 by Sun Microsystems, Inc.
+All rights reserved.
+
+Permission to use, copy, modify, and distribute this software and its
+documentation is hereby granted, provided that the above copyright
+notice appears in all copies.
+
+SUN MAKES NO REPRESENTATION OR WARRANTIES ABOUT THE SUITABILITY OF
+THE SOFTWARE, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED
+TO THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
+PARTICULAR PURPOSE, OR NON-INFRINGEMENT. SUN SHALL NOT BE LIABLE FOR
+ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
+DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES
diff --git a/options/license/pkgconf b/options/license/pkgconf
new file mode 100644
index 0000000000..b8b2ffd996
--- /dev/null
+++ b/options/license/pkgconf
@@ -0,0 +1,7 @@
+Permission to use, copy, modify, and/or distribute this software for any
+purpose with or without fee is hereby granted, provided that the above
+copyright notice and this permission notice appear in all copies.
+
+This software is provided 'as is' and without any warranty, express or
+implied. In no event shall the authors be liable for any damages arising
+from the use of this software.
From 994920c677b04a720726d982e4d6212664b82a43 Mon Sep 17 00:00:00 2001
From: silverwind
Date: Mon, 15 Apr 2024 10:24:36 +0200
Subject: [PATCH 021/556] Kill all gitea processes before air build (#30477)
So it happened to me multiple times that air leaves zombie processes
after termination. I think ultimately it's some kind of bug in air, but
we can work around.
The change in the delay is unrelated to the zombie processes but seems
to help a bit with duplicate changes resulting in duplicate `make
generate` as seen here:
---------
Co-authored-by: delvh
---
.air.toml | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/.air.toml b/.air.toml
index de97bd8b29..3740c4d4aa 100644
--- a/.air.toml
+++ b/.air.toml
@@ -2,9 +2,10 @@ root = "."
tmp_dir = ".air"
[build]
+pre_cmd = ["killall -9 gitea 2>/dev/null || true"] # kill off potential zombie processes from previous runs
cmd = "make --no-print-directory backend"
bin = "gitea"
-delay = 1000
+delay = 2000
include_ext = ["go", "tmpl"]
include_file = ["main.go"]
include_dir = ["cmd", "models", "modules", "options", "routers", "services"]
From 1508a85f6235814271ea927d651bcbcd8c9f5f18 Mon Sep 17 00:00:00 2001
From: silverwind
Date: Mon, 15 Apr 2024 10:49:48 +0200
Subject: [PATCH 022/556] Fix overflow on issue dependency (#30484)
Small tweak here to prevent this and likely other events from
overflowing in the timeline:
Co-authored-by: Giteabot
---
web_src/css/repo.css | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/web_src/css/repo.css b/web_src/css/repo.css
index 887789115e..0f6bf482b5 100644
--- a/web_src/css/repo.css
+++ b/web_src/css/repo.css
@@ -1063,6 +1063,12 @@ td .commit-summary {
margin-left: 15px;
}
+.repository.view.issue .comment-list .event .detail .text {
+ overflow: hidden;
+ white-space: nowrap;
+ text-overflow: ellipsis;
+}
+
.repository.view.issue .comment-list .event .segments {
box-shadow: none;
}
From c63060b130d34e3f03f28f4dccbf04d381a95c17 Mon Sep 17 00:00:00 2001
From: Lunny Xiao
Date: Mon, 15 Apr 2024 22:11:07 +0800
Subject: [PATCH 023/556] Fix code owners will not be mentioned when a pull
request comes from a forked repository (#30476)
Fix #30277
Caused by #29783
---
services/issue/pull.go | 8 ++++----
tests/integration/pull_create_test.go | 25 +++++++++++++++++++++++++
tests/integration/pull_review_test.go | 10 +++++++++-
3 files changed, 38 insertions(+), 5 deletions(-)
diff --git a/services/issue/pull.go b/services/issue/pull.go
index b7b63a7024..4a0009e82f 100644
--- a/services/issue/pull.go
+++ b/services/issue/pull.go
@@ -51,14 +51,14 @@ func PullRequestCodeOwnersReview(ctx context.Context, issue *issues_model.Issue,
return nil, err
}
- if pr.HeadRepo.IsFork {
- return nil, nil
- }
-
if err := pr.LoadBaseRepo(ctx); err != nil {
return nil, err
}
+ if pr.BaseRepo.IsFork {
+ return nil, nil
+ }
+
repo, err := gitrepo.OpenRepository(ctx, pr.BaseRepo)
if err != nil {
return nil, err
diff --git a/tests/integration/pull_create_test.go b/tests/integration/pull_create_test.go
index 029ea65d71..609bd73fd5 100644
--- a/tests/integration/pull_create_test.go
+++ b/tests/integration/pull_create_test.go
@@ -4,6 +4,7 @@
package integration
import (
+ "fmt"
"net/http"
"net/http/httptest"
"net/url"
@@ -57,6 +58,30 @@ func testPullCreate(t *testing.T, session *TestSession, user, repo string, toSel
return resp
}
+func testPullCreateDirectly(t *testing.T, session *TestSession, baseRepoOwner, baseRepoName, baseBranch, headRepoOwner, headRepoName, headBranch, title string) *httptest.ResponseRecorder {
+ headCompare := headBranch
+ if headRepoOwner != "" {
+ if headRepoName != "" {
+ headCompare = fmt.Sprintf("%s/%s:%s", headRepoOwner, headRepoName, headBranch)
+ } else {
+ headCompare = fmt.Sprintf("%s:%s", headRepoOwner, headBranch)
+ }
+ }
+ req := NewRequest(t, "GET", fmt.Sprintf("/%s/%s/compare/%s...%s", baseRepoOwner, baseRepoName, baseBranch, headCompare))
+ resp := session.MakeRequest(t, req, http.StatusOK)
+
+ // Submit the form for creating the pull
+ htmlDoc := NewHTMLParser(t, resp.Body)
+ link, exists := htmlDoc.doc.Find("form.ui.form").Attr("action")
+ assert.True(t, exists, "The template has changed")
+ req = NewRequestWithValues(t, "POST", link, map[string]string{
+ "_csrf": htmlDoc.GetCSRF(),
+ "title": title,
+ })
+ resp = session.MakeRequest(t, req, http.StatusOK)
+ return resp
+}
+
func TestPullCreate(t *testing.T) {
onGiteaRun(t, func(t *testing.T, u *url.URL) {
session := loginUser(t, "user1")
diff --git a/tests/integration/pull_review_test.go b/tests/integration/pull_review_test.go
index 9a5877697c..2d8b3cb4ab 100644
--- a/tests/integration/pull_review_test.go
+++ b/tests/integration/pull_review_test.go
@@ -161,10 +161,18 @@ func TestPullView_CodeOwner(t *testing.T) {
assert.NoError(t, err)
session := loginUser(t, "user5")
- testPullCreate(t, session, "user5", "test_codeowner", true, forkedRepo.DefaultBranch, "codeowner-basebranch-forked", "Test Pull Request2")
+
+ // create a pull request on the forked repository, code reviewers should not be mentioned
+ testPullCreateDirectly(t, session, "user5", "test_codeowner", forkedRepo.DefaultBranch, "", "", "codeowner-basebranch-forked", "Test Pull Request on Forked Repository")
pr := unittest.AssertExistsAndLoadBean(t, &issues_model.PullRequest{BaseRepoID: forkedRepo.ID, HeadBranch: "codeowner-basebranch-forked"})
unittest.AssertExistsIf(t, false, &issues_model.Review{IssueID: pr.IssueID, Type: issues_model.ReviewTypeRequest, ReviewerID: 8})
+
+ // create a pull request to base repository, code reviewers should be mentioned
+ testPullCreateDirectly(t, session, repo.OwnerName, repo.Name, repo.DefaultBranch, forkedRepo.OwnerName, forkedRepo.Name, "codeowner-basebranch-forked", "Test Pull Request3")
+
+ pr = unittest.AssertExistsAndLoadBean(t, &issues_model.PullRequest{BaseRepoID: repo.ID, HeadRepoID: forkedRepo.ID, HeadBranch: "codeowner-basebranch-forked"})
+ unittest.AssertExistsIf(t, true, &issues_model.Review{IssueID: pr.IssueID, Type: issues_model.ReviewTypeRequest, ReviewerID: 8})
})
})
}
From 2dc7e9e5fe66a361021e41046f7a88e61a45300b Mon Sep 17 00:00:00 2001
From: silverwind
Date: Mon, 15 Apr 2024 19:20:32 +0200
Subject: [PATCH 024/556] Fix button color on red and green buttons (#30500)
Previously these colors were provided by fomantic css. I missed them.
Fixes: https://github.com/go-gitea/gitea/issues/30499
Regressed by: https://github.com/go-gitea/gitea/pull/30475
---
web_src/css/modules/button.css | 2 ++
1 file changed, 2 insertions(+)
diff --git a/web_src/css/modules/button.css b/web_src/css/modules/button.css
index 47f55df7fa..87b9ddf292 100644
--- a/web_src/css/modules/button.css
+++ b/web_src/css/modules/button.css
@@ -249,6 +249,7 @@
.ui.red.button,
.ui.red.buttons .button {
+ color: var(--color-white);
background: var(--color-red);
}
@@ -283,6 +284,7 @@
.ui.green.button,
.ui.green.buttons .button {
+ color: var(--color-white);
background: var(--color-green);
}
From 3b40ebf895307a705738df3c5aba31843f0be74d Mon Sep 17 00:00:00 2001
From: silverwind
Date: Mon, 15 Apr 2024 20:22:53 +0200
Subject: [PATCH 025/556] Remove active border on pointing menu (#30486)
It looks better when these menus don't flash a border-bottom on click.
---
web_src/css/modules/menu.css | 1 -
1 file changed, 1 deletion(-)
diff --git a/web_src/css/modules/menu.css b/web_src/css/modules/menu.css
index 2581d8fab2..a392ffb5e9 100644
--- a/web_src/css/modules/menu.css
+++ b/web_src/css/modules/menu.css
@@ -588,7 +588,6 @@
.ui.secondary.pointing.menu .dropdown.item:active,
.ui.secondary.pointing.menu a.item:active {
background-color: transparent;
- border-color: var(--color-secondary);
}
.ui.secondary.pointing.menu .active.item {
From 2c80421243ed1fd6f53c3e1a84c06648524f7c66 Mon Sep 17 00:00:00 2001
From: yp05327 <576951401@qq.com>
Date: Tue, 16 Apr 2024 04:08:31 +0900
Subject: [PATCH 026/556] Convert max file name length to 255 (#30489)
Quick/Partly fix #29907
In Linux and MacOS, by default the max file name length is 255.
In windows, it depends on the version and settings, and has no file name
length limitation, but has path length limitation.
By default it is 260, considering path length is longer than filename,
so I think it is ok to do this.
For Windows, see
https://learn.microsoft.com/windows/win32/fileio/maximum-file-path-limitation?tabs=registry
For Linux, see
https://github.com/torvalds/linux/blob/master/include/uapi/linux/limits.h#L12-L13
For MacOS, see
https://discussions.apple.com/thread/254788848?sortBy=best
---
templates/repo/editor/edit.tmpl | 2 +-
templates/repo/editor/upload.tmpl | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/templates/repo/editor/edit.tmpl b/templates/repo/editor/edit.tmpl
index 46f82c47d4..d52e5a047a 100644
--- a/templates/repo/editor/edit.tmpl
+++ b/templates/repo/editor/edit.tmpl
@@ -15,7 +15,7 @@
{{range $i, $v := .TreeNames}}
diff --git a/templates/repo/settings/options.tmpl b/templates/repo/settings/options.tmpl
index df6ccbf6bc..251785d078 100644
--- a/templates/repo/settings/options.tmpl
+++ b/templates/repo/settings/options.tmpl
@@ -66,7 +66,7 @@
{{/* These variables exist to make the logic in the Settings window easier to comprehend and are not used later on. */}}
{{$newMirrorsPartiallyEnabled := or (not .DisableNewPullMirrors) (not .DisableNewPushMirrors)}}
{{/* .Repository.IsMirror is not always reliable if the repository is not actively acting as a mirror because of errors. */}}
- {{$showMirrorSettings := and (.Repository.UnitEnabled $.Context $.UnitTypeCode) (or $newMirrorsPartiallyEnabled .Repository.IsMirror .PullMirror .PushMirrors)}}
+ {{$showMirrorSettings := and (.Repository.UnitEnabled $.Context ctx.Consts.RepoUnitTypeCode) (or $newMirrorsPartiallyEnabled .Repository.IsMirror .PullMirror .PushMirrors)}}
{{$newMirrorsEntirelyEnabled := and (not .DisableNewPullMirrors) (not .DisableNewPushMirrors)}}
{{$onlyNewPushMirrorsEnabled := and (not .DisableNewPushMirrors) .DisableNewPullMirrors}}
{{$onlyNewPullMirrorsEnabled := and .DisableNewPushMirrors (not .DisableNewPullMirrors)}}
@@ -307,8 +307,8 @@
{{.CsrfTokenHtml}}
- {{$isCodeEnabled := .Repository.UnitEnabled $.Context $.UnitTypeCode}}
- {{$isCodeGlobalDisabled := .UnitTypeCode.UnitGlobalDisabled}}
+ {{$isCodeEnabled := .Repository.UnitEnabled $.Context ctx.Consts.RepoUnitTypeCode}}
+ {{$isCodeGlobalDisabled := ctx.Consts.RepoUnitTypeCode.UnitGlobalDisabled}}
diff --git a/web_src/css/form.css b/web_src/css/form.css
index a8f73b6b66..7479af0c4e 100644
--- a/web_src/css/form.css
+++ b/web_src/css/form.css
@@ -40,7 +40,7 @@ textarea,
/* fix fomantic small dropdown having inconsistent padding with input */
.ui.small.selection.dropdown {
- padding: .67857143em 3.2em .67857143em 1em;
+ padding: .67857143em 1.6em .67857143em 1em;
}
input:hover,
From ffc98790703cdc41ed2327e613aa2f91a051b457 Mon Sep 17 00:00:00 2001
From: GiteaBot
Date: Thu, 18 Apr 2024 00:26:04 +0000
Subject: [PATCH 047/556] [skip ci] Updated translations via Crowdin
---
options/locale/locale_cs-CZ.ini | 6 ------
options/locale/locale_de-DE.ini | 6 ------
options/locale/locale_el-GR.ini | 4 ----
options/locale/locale_es-ES.ini | 4 ----
options/locale/locale_fa-IR.ini | 3 ---
options/locale/locale_fi-FI.ini | 1 -
options/locale/locale_fr-FR.ini | 4 ----
options/locale/locale_hu-HU.ini | 3 ---
options/locale/locale_id-ID.ini | 2 --
options/locale/locale_is-IS.ini | 1 -
options/locale/locale_it-IT.ini | 3 ---
options/locale/locale_ja-JP.ini | 6 ------
options/locale/locale_lv-LV.ini | 4 ----
options/locale/locale_nl-NL.ini | 2 --
options/locale/locale_pl-PL.ini | 3 ---
options/locale/locale_pt-BR.ini | 4 ----
options/locale/locale_pt-PT.ini | 6 ------
options/locale/locale_ru-RU.ini | 4 ----
options/locale/locale_si-LK.ini | 2 --
options/locale/locale_sv-SE.ini | 3 ---
options/locale/locale_tr-TR.ini | 4 ----
options/locale/locale_uk-UA.ini | 3 ---
options/locale/locale_zh-CN.ini | 6 ------
options/locale/locale_zh-HK.ini | 1 -
options/locale/locale_zh-TW.ini | 3 ---
25 files changed, 88 deletions(-)
diff --git a/options/locale/locale_cs-CZ.ini b/options/locale/locale_cs-CZ.ini
index 82a8fe5d45..57c44e4b26 100644
--- a/options/locale/locale_cs-CZ.ini
+++ b/options/locale/locale_cs-CZ.ini
@@ -164,8 +164,6 @@ search=Hledat...
type_tooltip=Druh vyhledávání
fuzzy=Fuzzy
fuzzy_tooltip=Zahrnout výsledky, které také úzce odpovídají hledanému výrazu
-match=Shoda
-match_tooltip=Zahrnout pouze výsledky, které odpovídají přesnému hledanému výrazu
repo_kind=Hledat repozitáře...
user_kind=Hledat uživatele...
org_kind=Hledat organizace...
@@ -714,7 +712,6 @@ cancel=Zrušit
language=Jazyk
ui=Motiv vzhledu
hidden_comment_types=Skryté typy komentářů
-hidden_comment_types_description=Zde zkontrolované typy komentářů nebudou zobrazeny na stránkách problémů. Zaškrtnutí „Štítek“ například odstraní všechny komentáře „ přidal/odstranil “.
hidden_comment_types.ref_tooltip=Komentáře, na které se odkazovalo z jiného úkolu/commitu/…
hidden_comment_types.issue_ref_tooltip=Komentáře, kde uživatel změní větev/značku spojenou s problémem
comment_type_group_reference=Reference
@@ -1286,7 +1283,6 @@ editor.or=nebo
editor.cancel_lower=Zrušit
editor.commit_signed_changes=Odevzdat podepsané změny
editor.commit_changes=Odevzdat změny
-editor.add_tmpl=Přidán „“
editor.add=Přidat %s
editor.update=Aktualizovat %s
editor.delete=Odstranit %s
@@ -3075,14 +3071,12 @@ auths.tips=Tipy
auths.tips.oauth2.general=Ověřování OAuth2
auths.tips.oauth2.general.tip=Při registraci nové OAuth2 autentizace by URL callbacku/přesměrování měla být:
auths.tip.oauth2_provider=Poskytovatel OAuth2
-auths.tip.bitbucket=Vytvořte nového OAuth konzumenta na https://bitbucket.org/account/user//oauth-consumers/new a přidejte oprávnění „Account“ - „Read“
auths.tip.nextcloud=Zaregistrujte nového OAuth konzumenta na vaší instanci pomocí následujícího menu „Nastavení -> Zabezpečení -> OAuth 2.0 klient“
auths.tip.dropbox=Vytvořte novou aplikaci na https://www.dropbox.com/developers/apps
auths.tip.facebook=Registrujte novou aplikaci na https://developers.facebook.com/apps a přidejte produkt „Facebook Login“
auths.tip.github=Registrujte novou OAuth aplikaci na https://github.com/settings/applications/new
auths.tip.gitlab_new=Zaregistrujte novou aplikaci na https://gitlab.com/-/profile/applications
auths.tip.google_plus=Získejte klientské pověření OAuth2 z Google API konzole na https://console.developers.google.com/
-auths.tip.openid_connect=Použijte OpenID URL pro objevování spojení (/.well-known/openid-configuration) k nastavení koncových bodů
auths.tip.twitter=Jděte na https://dev.twitter.com/apps, vytvořte aplikaci a ujistěte se, že volba „Allow this application to be used to Sign in with Twitter“ je povolená
auths.tip.discord=Registrujte novou aplikaci na https://discordapp.com/developers/applications/me
auths.tip.gitea=Registrovat novou Oauth2 aplikaci. Návod naleznete na https://docs.gitea.com/development/oauth2-provider
diff --git a/options/locale/locale_de-DE.ini b/options/locale/locale_de-DE.ini
index 9a09c2922e..f591b75577 100644
--- a/options/locale/locale_de-DE.ini
+++ b/options/locale/locale_de-DE.ini
@@ -164,8 +164,6 @@ search=Suche ...
type_tooltip=Suchmodus
fuzzy=Ähnlich
fuzzy_tooltip=Ergebnisse einbeziehen, die dem Suchbegriff ähnlich sind
-match=Genau
-match_tooltip=Nur genau zum Suchbegriff passende Ergebnisse einbeziehen
repo_kind=Repositories durchsuchen ...
user_kind=Benutzer durchsuchen ...
org_kind=Organisationen durchsuchen ...
@@ -714,7 +712,6 @@ cancel=Abbrechen
language=Sprache
ui=Theme
hidden_comment_types=Ausgeblendeter Kommentartypen
-hidden_comment_types_description=Die hier markierten Kommentartypen werden nicht innerhalb der Issue-Seiten angezeigt. Das Überprüfen von "Label" entfernt beispielsweise alle " hinzugefügt/entfernt " Kommentare.
hidden_comment_types.ref_tooltip=Kommentare, in denen dieses Issue von einem anderen Issue/Commit referenziert wurde
hidden_comment_types.issue_ref_tooltip=Kommentare, bei denen der Benutzer den Branch/Tag des Issues ändert
comment_type_group_reference=Verweis auf Mitglieder
@@ -1287,7 +1284,6 @@ editor.or=oder
editor.cancel_lower=Abbrechen
editor.commit_signed_changes=Committe signierte Änderungen
editor.commit_changes=Änderungen committen
-editor.add_tmpl='' hinzufügen
editor.add=%s hinzugefügt
editor.update=%s aktualisiert
editor.delete=%s gelöscht
@@ -3083,14 +3079,12 @@ auths.tips=Tipps
auths.tips.oauth2.general=OAuth2-Authentifizierung
auths.tips.oauth2.general.tip=Beim Registrieren einer OAuth2-Anwendung sollte die Callback-URL folgendermaßen lauten:
auths.tip.oauth2_provider=OAuth2-Anbieter
-auths.tip.bitbucket=Registriere einen neuen OAuth-Consumer unter https://bitbucket.org/account/user//oauth-consumers/new und füge die Berechtigung „Account“ – „Read“ hinzu.
auths.tip.nextcloud=Registriere über das "Settings -> Security -> OAuth 2.0 client"-Menü einen neuen "OAuth consumer" auf der Nextcloud-Instanz
auths.tip.dropbox=Erstelle eine neue App auf https://www.dropbox.com/developers/apps.
auths.tip.facebook=Erstelle eine neue Anwendung auf https://developers.facebook.com/apps und füge das Produkt „Facebook Login“ hinzu.
auths.tip.github=Erstelle unter https://github.com/settings/applications/new eine neue OAuth-Anwendung.
auths.tip.gitlab_new=Erstelle eine neue Anwendung unter https://gitlab.com/-/profile/applications
auths.tip.google_plus=Du erhältst die OAuth2-Client-Zugangsdaten in der Google-API-Konsole unter https://console.developers.google.com/
-auths.tip.openid_connect=Benutze die OpenID-Connect-Discovery-URL (/.well-known/openid-configuration), um die Endpunkte zu spezifizieren
auths.tip.twitter=Gehe auf https://dev.twitter.com/apps, erstelle eine Anwendung und stelle sicher, dass die Option „Allow this application to be used to Sign in with Twitter“ aktiviert ist
auths.tip.discord=Erstelle unter https://discordapp.com/developers/applications/me eine neue Anwendung.
auths.tip.gitea=Registriere eine neue OAuth2-Anwendung. Eine Anleitung findest du unter https://docs.gitea.com/development/oauth2-provider/
diff --git a/options/locale/locale_el-GR.ini b/options/locale/locale_el-GR.ini
index 6ce5ae1ce9..64db2348da 100644
--- a/options/locale/locale_el-GR.ini
+++ b/options/locale/locale_el-GR.ini
@@ -651,7 +651,6 @@ cancel=Ακύρωση
language=Γλώσσα
ui=Θέμα Διεπαφής
hidden_comment_types=Κρυμμένοι τύποι σχολίων
-hidden_comment_types_description=Οι τύποι σχολίων που επιλέγονται εδώ δε θα εμφανίζονται μέσα στις σελίδες ζητημάτων. Επιλέγοντας π.χ το "Σήματα", θα αφαιρεθούν όλα τα σχόλια σαν το " πρόσθεσε/αφαίρεσε τα σήματα ".
hidden_comment_types.ref_tooltip=Σχόλια όπου αυτό το ζήτημα αναφέρθηκε από άλλο ζήτημα/υποβολή/…
hidden_comment_types.issue_ref_tooltip=Σχόλια όπου ο χρήστης αλλάζει τον κλάδο/ετικέτα που σχετίζεται με το ζήτημα
comment_type_group_reference=Αναφορά
@@ -1214,7 +1213,6 @@ editor.or=ή
editor.cancel_lower=Ακύρωση
editor.commit_signed_changes=Υποβολή Υπογεγραμμένων Αλλαγών
editor.commit_changes=Υποβολή Αλλαγών
-editor.add_tmpl=Προσθήκη ''
editor.add=Προσθήκη %s
editor.update=Ενημέρωση %s
editor.delete=Διαγραφή %s
@@ -2970,13 +2968,11 @@ auths.tips=Συμβουλές
auths.tips.oauth2.general=Ταυτοποίηση OAuth2
auths.tips.oauth2.general.tip=Κατά την εγγραφή μιας νέας ταυτοποίησης OAuth2, το URL κλήσης/ανακατεύθυνσης πρέπει να είναι:
auths.tip.oauth2_provider=Πάροχος OAuth2
-auths.tip.bitbucket=Καταχωρήστε ένα νέο καταναλωτή OAuth στο https://bitbucket.org/account/user//oauth-consumers/new και προσθέστε το δικαίωμα 'Account' - 'Read'
auths.tip.nextcloud=`Καταχωρήστε ένα νέο καταναλωτή OAuth στην υπηρεσία σας χρησιμοποιώντας το παρακάτω μενού "Settings -> Security -> OAuth 2.0 client"`
auths.tip.dropbox=Δημιουργήστε μια νέα εφαρμογή στο https://www.dropbox.com/developers/apps
auths.tip.facebook=`Καταχωρήστε μια νέα εφαρμογή στο https://developers.facebook.com/apps και προσθέστε το προϊόν "Facebook Login"`
auths.tip.github=Καταχωρήστε μια νέα εφαρμογή OAuth στο https://github.com/settings/applications/new
auths.tip.google_plus=Αποκτήστε τα διαπιστευτήρια πελάτη OAuth2 από την κονσόλα API της Google στο https://console.developers.google.com/
-auths.tip.openid_connect=Χρησιμοποιήστε το OpenID Connect Discovery URL (/.well known/openid-configuration) για να καθορίσετε τα τελικά σημεία
auths.tip.twitter=Πηγαίνετε στο https://dev.twitter.com/apps, δημιουργήστε μια εφαρμογή και βεβαιωθείτε ότι η επιλογή “Allow this application to be used to Sign in with Twitter” είναι ενεργοποιημένη
auths.tip.discord=Καταχωρήστε μια νέα εφαρμογή στο https://discordapp.com/developers/applications/me
auths.tip.gitea=Καταχωρήστε μια νέα εφαρμογή OAuth2. Μπορείτε να βρείτε τον οδηγό στο https://docs.gitea.com/development/oauth2-provider
diff --git a/options/locale/locale_es-ES.ini b/options/locale/locale_es-ES.ini
index fc78e1d439..d1d680c14c 100644
--- a/options/locale/locale_es-ES.ini
+++ b/options/locale/locale_es-ES.ini
@@ -648,7 +648,6 @@ cancel=Cancelar
language=Idioma
ui=Tema
hidden_comment_types=Tipos de comentarios ocultos
-hidden_comment_types_description=Los tipos de comentarios marcados aquí no se mostrarán dentro de las páginas de incidencia. Marcar "Etiqueta" por ejemplo elimina todos los comentarios " añadidos/eliminados ".
hidden_comment_types.ref_tooltip=Comentarios donde esta incidencia fue referenciada desde otra incidencia/commit/…
hidden_comment_types.issue_ref_tooltip=Comentarios donde el usuario cambia la rama/etiqueta asociada a la incidencia
comment_type_group_reference=Referencia
@@ -1207,7 +1206,6 @@ editor.or=o
editor.cancel_lower=Cancelar
editor.commit_signed_changes=Crear commit firmado de los cambios
editor.commit_changes=Crear commit de los cambios
-editor.add_tmpl=Añadir ''
editor.add=Añadir %s
editor.update=Actualizar %s
editor.delete=Eliminar %s
@@ -2953,13 +2951,11 @@ auths.tips=Consejos
auths.tips.oauth2.general=Autenticación OAuth2
auths.tips.oauth2.general.tip=Al registrar una nueva autenticación de OAuth2, la URL de devolución de llamada/redirección debe ser:
auths.tip.oauth2_provider=Proveedor OAuth2
-auths.tip.bitbucket=Registrar un nuevo usuario de OAuth en https://bitbucket.org/account/user//oauth-consumers/new y agregar el permiso 'Cuenta' - 'Lectura'
auths.tip.nextcloud=`Registre un nuevo consumidor OAuth en su instancia usando el siguiente menú "Configuración-> Seguridad-> cliente OAuth 2.0"`
auths.tip.dropbox=Crear nueva aplicación en https://www.dropbox.com/developers/apps
auths.tip.facebook=`Registre una nueva aplicación en https://developers.facebook.com/apps y agregue el producto "Facebook Login"`
auths.tip.github=Registre una nueva aplicación OAuth en https://github.com/settings/applications/new
auths.tip.google_plus=Obtener credenciales de cliente OAuth2 desde la consola API de Google en https://console.developers.google.com/
-auths.tip.openid_connect=Use el OpenID Connect Discovery URL (/.well-known/openid-configuration) para especificar los puntos finales
auths.tip.twitter=Ir a https://dev.twitter.com/apps, crear una aplicación y asegurarse de que la opción "Permitir que esta aplicación sea usada para iniciar sesión con Twitter" está activada
auths.tip.discord=Registrar una nueva aplicación en https://discordapp.com/developers/applications/me
auths.tip.gitea=Registrar una nueva aplicación OAuth2. Puede encontrar la guía en https://docs.gitea.com/development/oauth2-provider
diff --git a/options/locale/locale_fa-IR.ini b/options/locale/locale_fa-IR.ini
index d19eb356d2..54a4911e5c 100644
--- a/options/locale/locale_fa-IR.ini
+++ b/options/locale/locale_fa-IR.ini
@@ -947,7 +947,6 @@ editor.or=یا
editor.cancel_lower=انصراف
editor.commit_signed_changes=اعمال تغییرات امضا شده
editor.commit_changes=تغییرات کامیت
-editor.add_tmpl=افزودن ''
editor.commit_message_desc=توضیحی تخصصی به دلخواه اضافه نمایید…
editor.signoff_desc=یک تریلر Signed-off-by توسط committer در انتهای پیام گزارش commit اضافه کنید.
editor.commit_directly_to_this_branch=ثبت کامیت به صورت مستقیم در انشعاب %s.
@@ -2297,13 +2296,11 @@ auths.sspi_default_language_helper=زبان پیش فرض برای کاربرا
auths.tips=ﻧﮑﺎﺕ
auths.tips.oauth2.general=احراز هویت OAuth2
auths.tip.oauth2_provider=تامین کننده OAuth2
-auths.tip.bitbucket=ثبت یک OAuth جدید مصرف کننده بر https://bitbucket.org/account/user//oauth-consumers/new و افزودن مجوز 'Account' - 'Read'
auths.tip.nextcloud=با استفاده از منوی زیر "تنظیمات -> امنیت -> مشتری OAuth 2.0" مصرف کننده OAuth جدیدی را در نمونه خود ثبت کنید
auths.tip.dropbox=یک برنامه جدید در https://www.dropbox.com/developers/apps بسازید
auths.tip.facebook=`یک برنامه جدید در https://developers.facebook.com/apps بسازید برای ورود از طریق فیس بوک قسمت محصولات "Facebook Login"`
auths.tip.github=یک برنامه OAuth جدید در https://github.com/settings/applications/new ثبت کنید
auths.tip.google_plus=اطلاعات مربوط به مشتری OAuth2 را از کلاینت API Google در https://console.developers.google.com/
-auths.tip.openid_connect=برای مشخص کردن نقاط پایانی از آدرس OpenID Connect Discovery URL ( /.well-known/openid-configuration) استفاده کنید.
auths.tip.twitter=به https://dev.twitter.com/apps بروید ، برنامه ای ایجاد کنید و اطمینان حاصل کنید که گزینه "اجازه استفاده از این برنامه برای ورود به سیستم با Twitter" را فعال کنید
auths.tip.discord=یک برنامه جدید را در https://discordapp.com/developers/applications/me ثبت کنید
auths.tip.yandex=`یک برنامه جدید در https://oauth.yandex.com/client/new ایجاد کنید. مجوزهای زیر را از بخش "Yandex.Passport API" انتخاب کنید: "دسترسی به آدرس ایمیل"، "دسترسی به آواتار کاربر" و "دسترسی به نام کاربری، نام و نام خانوادگی، جنسیت"`
diff --git a/options/locale/locale_fi-FI.ini b/options/locale/locale_fi-FI.ini
index f283209908..ace676281f 100644
--- a/options/locale/locale_fi-FI.ini
+++ b/options/locale/locale_fi-FI.ini
@@ -767,7 +767,6 @@ editor.or=tai
editor.cancel_lower=Peru
editor.commit_signed_changes=Commitoi vahvistetut muutokset
editor.commit_changes=Commitoi muutokset
-editor.add_tmpl=Lisää ''
editor.commit_directly_to_this_branch=Commitoi suoraan %s haaraan.
editor.create_new_branch=Luo uusi haara tälle commitille ja aloita vetopyyntö.
editor.create_new_branch_np=Luo uusi haara tälle commitille.
diff --git a/options/locale/locale_fr-FR.ini b/options/locale/locale_fr-FR.ini
index dc66402901..c57bae77c0 100644
--- a/options/locale/locale_fr-FR.ini
+++ b/options/locale/locale_fr-FR.ini
@@ -654,7 +654,6 @@ cancel=Annuler
language=Langue
ui=Thème
hidden_comment_types=Catégories de commentaires masqués
-hidden_comment_types_description=Cochez les catégories suivantes pour masquer les commentaires correspondants des fils d'activité. Par exemple, « Label » cache les commentaires du genre « Cerise a attribué le label Bug il y a 2 heures. »
hidden_comment_types.ref_tooltip=Commentaires où ce ticket a été référencé sur un autre ticket, révision, etc.
hidden_comment_types.issue_ref_tooltip=Commentaires où l’utilisateur change la branche/étiquette associée au ticket
comment_type_group_reference=Référence
@@ -1223,7 +1222,6 @@ editor.or=ou
editor.cancel_lower=Annuler
editor.commit_signed_changes=Réviser les changements (signé)
editor.commit_changes=Réviser les changements
-editor.add_tmpl=Ajouter ''
editor.add=Ajouter %s
editor.update=Actualiser %s
editor.delete=Supprimer %s
@@ -2997,13 +2995,11 @@ auths.tips=Conseils
auths.tips.oauth2.general=Authentification OAuth2
auths.tips.oauth2.general.tip=Lors de l'enregistrement d'une nouvelle authentification OAuth2, l'URL de rappel/redirection doit être :
auths.tip.oauth2_provider=Fournisseur OAuth2
-auths.tip.bitbucket=`Créez un nouveau jeton OAuth sur https://bitbucket.org/account/user//oauth-consumers/new et ajoutez la permission "Compte"-"Lecture"`
auths.tip.nextcloud=`Enregistrez un nouveau consommateur OAuth sur votre instance en utilisant le menu "Paramètres -> Sécurité -> Client OAuth 2.0"`
auths.tip.dropbox=Créez une nouvelle application sur https://www.dropbox.com/developers/apps
auths.tip.facebook=`Enregistrez une nouvelle application sur https://developers.facebook.com/apps et ajoutez le produit "Facebook Login"`
auths.tip.github=Créez une nouvelle application OAuth sur https://github.com/settings/applications/new
auths.tip.google_plus=Obtenez des identifiants OAuth2 sur la console API de Google (https://console.developers.google.com/)
-auths.tip.openid_connect=Utilisez l'URL de découvert OpenID (/.well-known/openid-configuration) pour spécifier les points d'accès
auths.tip.twitter=Rendez-vous sur https://dev.twitter.com/apps, créez une application et assurez-vous que l'option "Autoriser l'application à être utilisée avec Twitter Connect" est activée
auths.tip.discord=Enregistrer une nouvelle application sur https://discordapp.com/developers/applications/me
auths.tip.gitea=Enregistrez une nouvelle application OAuth2. Le guide peut être trouvé sur https://docs.gitea.com/development/oauth2-provider
diff --git a/options/locale/locale_hu-HU.ini b/options/locale/locale_hu-HU.ini
index fb229090d4..bddd6dd582 100644
--- a/options/locale/locale_hu-HU.ini
+++ b/options/locale/locale_hu-HU.ini
@@ -711,7 +711,6 @@ editor.name_your_file=Fájl elnevezése…
editor.or=vagy
editor.cancel_lower=Mégse
editor.commit_changes=Változások Véglegesítése
-editor.add_tmpl='' hozzáadása
editor.commit_message_desc=Opcionális hosszabb leírás hozzáadása…
editor.commit_directly_to_this_branch=Mentés egyenesen a(z) %s ágba.
editor.create_new_branch=Hozzon létre egy új ágat ennek a commit-nak és indíts egy egyesítési kérést.
@@ -1401,12 +1400,10 @@ auths.enable_auto_register=Automatikus regisztráció engedélyezése
auths.tips=Tippek
auths.tips.oauth2.general=OAuth2 hitelesítés
auths.tip.oauth2_provider=OAuth2 szolgáltató
-auths.tip.bitbucket=Igényeljen egy új OAuth jogosultságot itt: https://bitbucket.org/account/user//oauth-consumers/new és adja hozzá jogosultságot a "Fiókok"-"Olvasás" alá
auths.tip.dropbox=Vegyen fel új alkalmazást itt: https://www.dropbox.com/developers/apps
auths.tip.facebook=Vegyen fel új alkalmazást itt: https://developers.facebook.com/apps majd adja hozzá a "Facebook Login"-t
auths.tip.github=Vegyen fel új OAuth alkalmazást itt: https://github.com/settings/applications/new
auths.tip.google_plus=Szerezzen OAuth2 kliens hitelesítési adatokat a Google API konzolban (https://console.developers.google.com/)
-auths.tip.openid_connect=Használja az OpenID kapcsolódás felfedező URL-t (/.well-known/openid-configuration) a végpontok beállításához
auths.tip.twitter=Menyjen ide: https://dev.twitter.com/apps, hozzon létre egy alkalmazást és győződjön meg róla, hogy az “Allow this application to be used to Sign in with Twitter” opció be van kapcsolva
auths.tip.discord=Vegyen fel új alkalmazást itt:
https://discordapp.com/developers/applications/me
diff --git a/options/locale/locale_id-ID.ini b/options/locale/locale_id-ID.ini
index 96248cbc1d..9261077831 100644
--- a/options/locale/locale_id-ID.ini
+++ b/options/locale/locale_id-ID.ini
@@ -620,7 +620,6 @@ editor.filename_help=Tambahkan direktori dengan mengetikkan nama direktori diiku
editor.or=atau
editor.cancel_lower=Batalkan
editor.commit_changes=Perubahan komitmen
-editor.add_tmpl=Tambahkan ''
editor.commit_message_desc=Tambahkan deskripsi opsional yang panjang…
editor.commit_directly_to_this_branch=Komitmen langsung ke %s cabang.
editor.create_new_branch=Membuat new branch untuk tarik komit ini mulai permintaan.
@@ -1118,7 +1117,6 @@ auths.tip.oauth2_provider=Penyediaan OAuth2
auths.tip.dropbox=Membuat aplikasi baru di https://www.dropbox.com/developers/apps
auths.tip.facebook=`Daftarkan sebuah aplikasi baru di https://developers.facebook.com/apps dan tambakan produk "Facebook Masuk"`
auths.tip.github=Mendaftar aplikasi OAuth baru di https://github.com/settings/applications/new
-auths.tip.openid_connect=Gunakan membuka ID yang terhubung ke jelajah URL (/.well-known/openid-configuration) untuk menentukan titik akhir
auths.delete=Menghapus Otentikasi Sumber
auths.delete_auth_title=Menghapus Otentikasi Sumber
diff --git a/options/locale/locale_is-IS.ini b/options/locale/locale_is-IS.ini
index 3165c4185b..a1116eddbc 100644
--- a/options/locale/locale_is-IS.ini
+++ b/options/locale/locale_is-IS.ini
@@ -697,7 +697,6 @@ editor.delete_this_file=Eyða Skrá
editor.name_your_file=Nefndu skrána þína…
editor.or=eða
editor.cancel_lower=Hætta við
-editor.add_tmpl=Bæta við „“
editor.create_new_branch=Búðu til nýja grein og sameiningarbeiðni fyrir þetta framlag.
editor.create_new_branch_np=Búðu til nýja grein fyrir þetta framlag.
editor.new_branch_name_desc=Heiti nýjar greinar…
diff --git a/options/locale/locale_it-IT.ini b/options/locale/locale_it-IT.ini
index 9a22995dfb..b15a78ccf4 100644
--- a/options/locale/locale_it-IT.ini
+++ b/options/locale/locale_it-IT.ini
@@ -1018,7 +1018,6 @@ editor.or=o
editor.cancel_lower=Annulla
editor.commit_signed_changes=Conferma modifiche firmate
editor.commit_changes=Apporta le modifiche
-editor.add_tmpl=Aggiungi ''
editor.patch=Applica Patch
editor.patching=Patching:
editor.new_patch=Nuova Patch
@@ -2489,13 +2488,11 @@ auths.sspi_default_language_helper=Lingua predefinita per gli utenti creati auto
auths.tips=Consigli
auths.tips.oauth2.general=Autenticazione OAuth2
auths.tip.oauth2_provider=OAuth2 Provider
-auths.tip.bitbucket=Registra un nuovo cliente OAuth su https://bitbucket.org/account/user//oauth-consumers/new e aggiungi il permesso 'Account' - 'Read'
auths.tip.nextcloud=`Registra un nuovo OAuth sulla tua istanza utilizzando il seguente menu "Impostazioni -> Sicurezza -> OAuth 2.0 client"`
auths.tip.dropbox=Crea una nuova applicazione su https://www.dropbox.com/developers/apps
auths.tip.facebook=`Registra una nuova applicazione su https://developers.facebook.com/apps e aggiungi il prodotto "Facebook Login"`
auths.tip.github=Registra una nuova applicazione OAuth su https://github.com/settings/applications/new
auths.tip.google_plus=Ottieni le credenziali del client OAuth2 dalla console API di Google su https://console.developers.google.com/
-auths.tip.openid_connect=Utilizza l'OpenID Connect Discovery URL (/.well-known/openid-configuration) per specificare gli endpoint
auths.tip.twitter=Vai su https://dev.twitter.com/apps, crea una applicazione e assicurati che l'opzione "Allow this application to be used to Sign In with Twitter" sia abilitata
auths.tip.discord=Registra una nuova applicazione su https://discordapp.com/developers/applications/me
auths.tip.yandex=`Crea una nuova applicazione su https://oauth.yandex.com/client/new. Seleziona i seguenti permessi da "Yandex. assport API": "Access to email address", "Access to user avatar" e "Access to username, name and surname, gender"`
diff --git a/options/locale/locale_ja-JP.ini b/options/locale/locale_ja-JP.ini
index 74ff775cc8..dd5e58133e 100644
--- a/options/locale/locale_ja-JP.ini
+++ b/options/locale/locale_ja-JP.ini
@@ -164,8 +164,6 @@ search=検索…
type_tooltip=検索タイプ
fuzzy=あいまい
fuzzy_tooltip=検索ワードに近い結果も含めます
-match=一致
-match_tooltip=検索ワードと完全に一致する結果のみ含めます
repo_kind=リポジトリを検索...
user_kind=ユーザーを検索...
org_kind=組織を検索...
@@ -709,7 +707,6 @@ cancel=キャンセル
language=言語
ui=テーマ
hidden_comment_types=非表示にするコメントの種類
-hidden_comment_types_description=ここでチェックを入れたコメントの種類は、イシューのページには表示されません。 たとえば「ラベル」にチェックを入れると、「<ユーザー> が <ラベル> を追加/削除」といったコメントはすべて除去されます。
hidden_comment_types.ref_tooltip=このイシューが別のイシューやコミット等から参照された、というコメント
hidden_comment_types.issue_ref_tooltip=このイシューのブランチやタグへの関連付けをユーザーが変更した、というコメント
comment_type_group_reference=参照
@@ -1282,7 +1279,6 @@ editor.or=または
editor.cancel_lower=キャンセル
editor.commit_signed_changes=署名した変更をコミット
editor.commit_changes=変更をコミット
-editor.add_tmpl='<ファイル名>' を追加
editor.add=%s を追加
editor.update=%s を更新
editor.delete=%s を削除
@@ -3080,14 +3076,12 @@ auths.tips=ヒント
auths.tips.oauth2.general=OAuth2認証
auths.tips.oauth2.general.tip=新しいOAuth2認証を登録するときは、コールバック/リダイレクトURLは以下になります:
auths.tip.oauth2_provider=OAuth2プロバイダー
-auths.tip.bitbucket=新しいOAuthコンシューマーを https://bitbucket.org/account/user/<あなたのユーザー名>/oauth-consumers/new から登録し、"アカウント" に "読み取り" 権限を追加してください。
auths.tip.nextcloud=新しいOAuthコンシューマーを、インスタンスのメニュー "Settings -> Security -> OAuth 2.0 client" から登録してください。
auths.tip.dropbox=新しいアプリケーションを https://www.dropbox.com/developers/apps から登録してください。
auths.tip.facebook=新しいアプリケーションを https://developers.facebook.com/apps で登録し、"Facebook Login"を追加してください。
auths.tip.github=新しいOAuthアプリケーションを https://github.com/settings/applications/new から登録してください。
auths.tip.gitlab_new=新しいアプリケーションを https://gitlab.com/-/profile/applications から登録してください。
auths.tip.google_plus=OAuth2クライアント資格情報を、Google APIコンソール https://console.developers.google.com/ から取得してください。
-auths.tip.openid_connect=OpenID Connect DiscoveryのURL (/.well-known/openid-configuration) をエンドポイントとして指定してください
auths.tip.twitter=https://dev.twitter.com/apps へアクセスしてアプリケーションを作成し、“Allow this application to be used to Sign in with Twitter”オプションを有効にしてください。
auths.tip.discord=新しいアプリケーションを https://discordapp.com/developers/applications/me から登録してください。
auths.tip.gitea=新しいOAuthアプリケーションを登録してください。 利用ガイドは https://docs.gitea.com/development/oauth2-provider にあります
diff --git a/options/locale/locale_lv-LV.ini b/options/locale/locale_lv-LV.ini
index 9a15090012..6afb488414 100644
--- a/options/locale/locale_lv-LV.ini
+++ b/options/locale/locale_lv-LV.ini
@@ -651,7 +651,6 @@ cancel=Atcelt
language=Valoda
ui=Motīvs
hidden_comment_types=Attēlojot paslēpt šauds komentārus:
-hidden_comment_types_description=Komentāru veidi, kas atzīmēti, netiks rādīti problēmas lapā. Piemēram, atzīmējot "Etiķetes" netiks rādīti komentāri " pievienoja/noņēma ".
hidden_comment_types.ref_tooltip=Komentāri, kad problēmai tiek pievienota atsauce uz citu probēmu, komentāru, …
hidden_comment_types.issue_ref_tooltip=Komentāri par lietotāja izmaiņām ar problēmas saistīto atzaru/tagu
comment_type_group_reference=Atsauces
@@ -1215,7 +1214,6 @@ editor.or=vai
editor.cancel_lower=Atcelt
editor.commit_signed_changes=Apstiprināt parakstītu revīziju
editor.commit_changes=Pabeigt revīziju
-editor.add_tmpl=Pievienot ''
editor.add=Pievienot %s
editor.update=Atjaunot %s
editor.delete=Dzēst %s
@@ -2976,13 +2974,11 @@ auths.tips=Padomi
auths.tips.oauth2.general=OAuth2 autentifikācija
auths.tips.oauth2.general.tip=Kad tiek reģistrēta jauna OAuth2 autentifikācija, atzvanīšanas/pārvirzīšanas URL vajadzētu būt:
auths.tip.oauth2_provider=OAuth2 pakalpojuma sniedzējs
-auths.tip.bitbucket=Reģistrējiet jaunu OAuth klientu adresē https://bitbucket.org/account/user//oauth-consumers/new un piešķiriet tam "Account" - "Read" tiesības
auths.tip.nextcloud=`Reģistrējiet jaunu OAuth klientu jūsu instances sadāļā "Settings -> Security -> OAuth 2.0 client"`
auths.tip.dropbox=Izveidojiet jaunu aplikāciju adresē https://www.dropbox.com/developers/apps
auths.tip.facebook=`Reģistrējiet jaunu aplikāciju adresē https://developers.facebook.com/apps un pievienojiet produktu "Facebook Login"`
auths.tip.github=Reģistrējiet jaunu aplikāciju adresē https://github.com/settings/applications/new
auths.tip.google_plus=Iegūstiet OAuth2 klienta pilnvaru no Google API konsoles adresē https://console.developers.google.com/
-auths.tip.openid_connect=Izmantojiet OpenID pieslēgšanās atklāšanas URL (/.well-known/openid-configuration), lai norādītu galapunktus
auths.tip.twitter=Dodieties uz adresi https://dev.twitter.com/apps, izveidojiet lietotni un pārliecinieties, ka ir atzīmēts “Allow this application to be used to Sign in with Twitter”
auths.tip.discord=Reģistrējiet jaunu aplikāciju adresē https://discordapp.com/developers/applications/me
auths.tip.gitea=Pievienot jaunu OAuth2 lietojumprogrammu. Dokumentācija ir pieejama https://docs.gitea.com/development/oauth2-provider
diff --git a/options/locale/locale_nl-NL.ini b/options/locale/locale_nl-NL.ini
index 6b5122a86f..b0b081db5d 100644
--- a/options/locale/locale_nl-NL.ini
+++ b/options/locale/locale_nl-NL.ini
@@ -1016,7 +1016,6 @@ editor.or=of
editor.cancel_lower=Annuleer
editor.commit_signed_changes=Commit Ondertekende Wijzigingen
editor.commit_changes=Wijzigingen doorvoeren
-editor.add_tmpl='' toevoegen
editor.patch=Patch toepassen
editor.patching=Patchen:
editor.new_patch=Nieuwe Patch
@@ -2345,7 +2344,6 @@ auths.tip.dropbox=Maak een nieuwe applicatie aan op https://www.dropbox.com/deve
auths.tip.facebook=Registreer een nieuwe applicatie op https://developers.facebook.com/apps en voeg het product "Facebook Login" toe
auths.tip.github=Registreer een nieuwe OAuth toepassing op https://github.com/settings/applications/new
auths.tip.google_plus=Verkrijg OAuth2 client referenties van de Google API console op https://console.developers.google.com/
-auths.tip.openid_connect=Gebruik de OpenID Connect Discovery URL (/.well-known/openid-configuration) om de eindpunten op te geven
auths.tip.yandex=`Maak een nieuwe applicatie aan op https://oauth.yandex.com/client/new. Selecteer de volgende machtigingen van de "Yandex". assport API sectie: "Toegang tot e-mailadres", "Toegang tot avatar" en "Toegang tot gebruikersnaam, voornaam en achternaam, geslacht"`
auths.edit=Authenticatiebron bewerken
auths.activated=Deze authenticatiebron is geactiveerd
diff --git a/options/locale/locale_pl-PL.ini b/options/locale/locale_pl-PL.ini
index a1d7e95842..fd5db4109f 100644
--- a/options/locale/locale_pl-PL.ini
+++ b/options/locale/locale_pl-PL.ini
@@ -950,7 +950,6 @@ editor.or=lub
editor.cancel_lower=Anuluj
editor.commit_signed_changes=Zatwierdź podpisane zmiany
editor.commit_changes=Zatwierdź zmiany
-editor.add_tmpl=Dodanie ''
editor.commit_message_desc=Dodaj dodatkowy rozszerzony opis…
editor.commit_directly_to_this_branch=Zmieniaj bezpośrednio gałąź %s.
editor.create_new_branch=Stwórz nową gałąź dla tego commita i rozpocznij Pull Request.
@@ -2223,13 +2222,11 @@ auths.sspi_default_language_helper=Domyślny język dla użytkowników automatyc
auths.tips=Wskazówki
auths.tips.oauth2.general=Uwierzytelnianie OAuth2
auths.tip.oauth2_provider=Dostawca OAuth2
-auths.tip.bitbucket=`Zarejestruj nowego konsumenta OAuth na https://bitbucket.org/account/user//oauth-consumers/new i dodaj uprawnienie "Account" - "Read"`
auths.tip.nextcloud=`Zarejestruj nowego klienta OAuth w swojej instancji za pomocą menu "Ustawienia -> Bezpieczeństwo -> Klient OAuth 2.0"`
auths.tip.dropbox=Stwórz nową aplikację na https://www.dropbox.com/developers/apps
auths.tip.facebook=`Zarejestruj nową aplikację na https://developers.facebook.com/apps i dodaj produkt "Facebook Login"`
auths.tip.github=Zarejestruj nową aplikację OAuth na https://github.com/settings/applications/new
auths.tip.google_plus=Uzyskaj dane uwierzytelniające klienta OAuth2 z konsoli Google API na https://console.developers.google.com/
-auths.tip.openid_connect=Użyj adresu URL OpenID Connect Discovery (/.well-known/openid-configuration), aby określić punkty końcowe
auths.tip.twitter=Przejdź na https://dev.twitter.com/apps, stwórz aplikację i upewnij się, że opcja “Allow this application to be used to Sign in with Twitter” jest włączona
auths.tip.discord=Zarejestruj nową aplikację na https://discordapp.com/developers/applications/me
auths.tip.yandex=`Utwórz nową aplikację na https://oauth.yandex.com/client/new. Wybierz następujące uprawnienia z "Yandex.Passport API": "Access to email address", "Access to user avatar" and "Access to username, first name and surname, gender"`
diff --git a/options/locale/locale_pt-BR.ini b/options/locale/locale_pt-BR.ini
index 45f1c3b3f8..5a058c807b 100644
--- a/options/locale/locale_pt-BR.ini
+++ b/options/locale/locale_pt-BR.ini
@@ -652,7 +652,6 @@ cancel=Cancelar
language=Idioma
ui=Tema
hidden_comment_types=Tipos de comentários ocultos
-hidden_comment_types_description=Os tipos de comentários marcados aqui não serão exibidos nas páginas de issues. Marcar "Rótulo", por exemplo, remove todos os comentários " adicionou/removeu ".
hidden_comment_types.ref_tooltip=Comentários onde este issue foi referenciado de outro issue/commit/…
hidden_comment_types.issue_ref_tooltip=Comentários onde o usuário altera o branch/tag associado ao issue
comment_type_group_reference=Referência
@@ -1212,7 +1211,6 @@ editor.or=ou
editor.cancel_lower=Cancelar
editor.commit_signed_changes=Commit de alteradores assinadas
editor.commit_changes=Aplicar commit das alterações
-editor.add_tmpl=Adicionar ''
editor.add=Adicionar %s
editor.update=Atualizar %s
editor.delete=Excluir %s
@@ -2918,13 +2916,11 @@ auths.tips=Dicas
auths.tips.oauth2.general=Autenticação OAuth2
auths.tips.oauth2.general.tip=Ao registrar uma nova autenticação OAuth2, o URL de retorno de chamada/redirecionamento deve ser:
auths.tip.oauth2_provider=Provedor OAuth2
-auths.tip.bitbucket=Cadastrar um novo consumidor de OAuth em https://bitbucket.org/account/user/ e adicionar a permissão 'Account' - 'Read'
auths.tip.nextcloud=`Registre um novo consumidor OAuth em sua instância usando o seguinte menu "Configurações -> Segurança -> Cliente OAuth 2.0"`
auths.tip.dropbox=Criar um novo aplicativo em https://www.dropbox.com/developers/apps
auths.tip.facebook=`Cadastrar um novo aplicativo em https://developers.facebook.com/apps e adicionar o produto "Facebook Login"`
auths.tip.github=Cadastrar um novo aplicativo de OAuth na https://github.com/settings/applications/new
auths.tip.google_plus=Obter credenciais de cliente OAuth2 do console de API do Google em https://console.developers.google.com/
-auths.tip.openid_connect=Use o OpenID Connect Discovery URL (/.well-known/openid-configuration) para especificar os endpoints
auths.tip.twitter=Vá em https://dev.twitter.com/apps, crie um aplicativo e certifique-se de que está habilitada a opção “Allow this application to be used to Sign in with Twitter“
auths.tip.discord=Cadastrar um novo aplicativo em https://discordapp.com/developers/applications/me
auths.tip.yandex=`Crie um novo aplicativo em https://oauth.yandex.com/client/new. Selecione as seguintes permissões da seção "Yandex.Passport API": "Access to email address", "Access to user avatar" and "Access to username, first name and surname, gender"`
diff --git a/options/locale/locale_pt-PT.ini b/options/locale/locale_pt-PT.ini
index 59b3d3df67..4f21b881c5 100644
--- a/options/locale/locale_pt-PT.ini
+++ b/options/locale/locale_pt-PT.ini
@@ -164,8 +164,6 @@ search=Pesquisar...
type_tooltip=Tipo de pesquisa
fuzzy=Aproximada
fuzzy_tooltip=Incluir também os resultados que estejam próximos do termo de pesquisa
-match=Fiel
-match_tooltip=Incluir somente os resultados que correspondam rigorosamente ao termo de pesquisa
repo_kind=Pesquisar repositórios...
user_kind=Pesquisar utilizadores...
org_kind=Pesquisar organizações...
@@ -714,7 +712,6 @@ cancel=Cancelar
language=Idioma
ui=Tema
hidden_comment_types=Tipos de comentários ocultos
-hidden_comment_types_description=Os tipos de comentário marcados aqui não serão mostrados dentro das páginas das questões. Marcar "Rótulo", por exemplo, remove todos os comentários " adicionou/removeu ".
hidden_comment_types.ref_tooltip=Comentários onde esta questão foi referenciada a partir de outra questão/cometimento/…
hidden_comment_types.issue_ref_tooltip=Comentários onde o utilizador altera o ramo/etiqueta associado à questão
comment_type_group_reference=Referência
@@ -1289,7 +1286,6 @@ editor.or=ou
editor.cancel_lower=Cancelar
editor.commit_signed_changes=Cometer modificações assinadas
editor.commit_changes=Cometer modificações
-editor.add_tmpl=Adicionar ''
editor.add=Adicionar %s
editor.update=Modificar %s
editor.delete=Eliminar %s
@@ -3087,14 +3083,12 @@ auths.tips=Dicas
auths.tips.oauth2.general=Autenticação OAuth2
auths.tips.oauth2.general.tip=Ao registar uma nova autenticação OAuth2, o URL da ligação de retorno ou do reencaminhamento deve ser:
auths.tip.oauth2_provider=Fornecedor OAuth2
-auths.tip.bitbucket=Registe um novo consumidor de OAuth em https://bitbucket.org/account/user//oauth-consumers/new e adicione a permissão 'Account' - 'Read'
auths.tip.nextcloud=`Registe um novo consumidor OAuth na sua instância usando o seguinte menu "Configurações → Segurança → Cliente OAuth 2.0"`
auths.tip.dropbox=Crie uma nova aplicação em https://www.dropbox.com/developers/apps
auths.tip.facebook=`Registe uma nova aplicação em https://developers.facebook.com/apps e adicione o produto "Facebook Login"`
auths.tip.github=Registe uma nova aplicação OAuth em https://github.com/settings/applications/new
auths.tip.gitlab_new=Registe uma nova aplicação em https://gitlab.com/-/profile/applications
auths.tip.google_plus=Obtenha credenciais de cliente OAuth2 a partir da consola do Google API em https://console.developers.google.com/
-auths.tip.openid_connect=Use o URL da descoberta de conexão OpenID (/.well-known/openid-configuration) para especificar os extremos
auths.tip.twitter=`Vá a https://dev.twitter.com/apps, crie uma aplicação e certifique-se de que está habilitada a opção "Allow this application to be used to Sign in with Twitter"`
auths.tip.discord=Registe uma nova aplicação em https://discordapp.com/developers/applications/me
auths.tip.gitea=Registe uma nova aplicação OAuth2. O guia pode ser encontrado em https://docs.gitea.com/development/oauth2-provider
diff --git a/options/locale/locale_ru-RU.ini b/options/locale/locale_ru-RU.ini
index 818dad1147..d4098aa952 100644
--- a/options/locale/locale_ru-RU.ini
+++ b/options/locale/locale_ru-RU.ini
@@ -649,7 +649,6 @@ cancel=Отмена
language=Язык
ui=Тема
hidden_comment_types=Скрытые типы комментариев
-hidden_comment_types_description=Отмеченные типы комментариев не будут отображаться на страницах задач. Например, если выбрать «Метки», не станет всех комментариев «<пользователь> добавил/удалил <метку>».
hidden_comment_types.ref_tooltip=Комментарии об упоминании задачи в другой задаче/коммите/…
hidden_comment_types.issue_ref_tooltip=Комментарии об изменении ветки/тега, связанных с этой задачей
comment_type_group_reference=Упоминания
@@ -1192,7 +1191,6 @@ editor.or=или
editor.cancel_lower=Отменить
editor.commit_signed_changes=Зафиксировать подписанные изменения
editor.commit_changes=Сохранить правки
-editor.add_tmpl=Добавить ''
editor.add=Добавить %s
editor.update=Обновить %s
editor.delete=Удалить %s
@@ -2909,13 +2907,11 @@ auths.sspi_default_language_helper=Язык по умолчанию для по
auths.tips=Советы
auths.tips.oauth2.general=Аутентификация OAuth2
auths.tip.oauth2_provider=Поставщик OAuth2
-auths.tip.bitbucket=`Создайте OAuth URI на странице https://bitbucket.org/account/user/<имя пользователя>/oauth-consumers/new и добавьте права "Account" - "Read"`
auths.tip.nextcloud=`Зарегистрируйте нового потребителя OAuth в вашем экземпляре, используя меню "Settings -> Security -> OAuth 2.0 client"`
auths.tip.dropbox=Добавьте новое приложение на https://www.dropbox.com/developers/apps
auths.tip.facebook=Зарегистрируйте новое приложение на https://developers.facebook.com/apps и добавьте модуль «Facebook Login»
auths.tip.github=Добавьте OAuth приложение на https://github.com/settings/applications/new
auths.tip.google_plus=Получите учётные данные клиента OAuth2 в консоли Google API на странице https://console.developers.google.com/
-auths.tip.openid_connect=Используйте OpenID Connect Discovery URL (/.well-known/openid-configuration) для автоматической настройки входа OAuth
auths.tip.twitter=Перейдите на https://dev.twitter.com/apps, создайте приложение и убедитесь, что включена опция «Разрешить это приложение для входа в систему с помощью Twitter»
auths.tip.discord=Добавьте новое приложение на https://discordapp.com/developers/applications/me
auths.tip.yandex=`Создайте новое приложение по адресу https://oauth.yandex.com/client/new. В разделе "API Яндекс.Паспорта" выберите следующие разрешения: "Доступ к адресу электронной почты", "Доступ к аватару пользователя" и "Доступ к имени пользователя, фамилии и полу"`
diff --git a/options/locale/locale_si-LK.ini b/options/locale/locale_si-LK.ini
index 99559802c5..05538af971 100644
--- a/options/locale/locale_si-LK.ini
+++ b/options/locale/locale_si-LK.ini
@@ -919,7 +919,6 @@ editor.or=හෝ
editor.cancel_lower=අවලංගු කරන්න
editor.commit_signed_changes=අත්සන් කළ වෙනස්කම් සිදු කරන්න
editor.commit_changes=වෙනස්කම් සිදු කරන්න
-editor.add_tmpl='' එකතු කරන්න
editor.commit_message_desc=විකල්ප දීර්ඝ විස්තරයක් එක් කරන්න…
editor.signoff_desc=කැපවූ ලොග් පණිවිඩය අවසානයේ දී කැපකරු විසින් සිග්නෙඩ්-ඕෆ්-විසින් ට්රේලරයක් එක් කරන්න.
editor.commit_directly_to_this_branch=%s ශාඛාවට කෙලින්ම කැප කරන්න.
@@ -2261,7 +2260,6 @@ auths.tip.dropbox=https://www.dropbox.com/developers/apps හි නව යෙ
auths.tip.facebook=https://developers.facebook.com/apps හි නව යෙදුමක් ලියාපදිංචි කර නිෂ්පාදනය එකතු කරන්න “ෆේස්බුක් ලොගින් වන්න”
auths.tip.github=https://github.com/settings/applications/new හි නව OAUTH අයදුම්පතක් ලියාපදිංචි කරන්න
auths.tip.google_plus=ගූගල් API කොන්සෝලය වෙතින් OUT2 සේවාදායක අක්තපත්ර ලබා ගන්න https://console.developers.google.com/
-auths.tip.openid_connect=අන්ත ලක්ෂ්ය නියම කිරීම සඳහා OpenID Connect ඩිස්කවරි URL (/.හොඳින් දැන /openid-වින්යාසය) භාවිතා කරන්න
auths.tip.twitter=https://dev.twitter.com/apps වෙත යන්න, යෙදුමක් සාදන්න සහ “මෙම යෙදුම ට්විටර් සමඟ පුරනය වීමට භාවිතා කිරීමට ඉඩ දෙන්න” විකල්පය සක්රීය කර ඇති බවට සහතික වන්න
auths.tip.discord=https://discordapp.com/developers/applications/me හි නව අයදුම්පතක් ලියාපදිංචි කරන්න
auths.tip.yandex=https://oauth.yandex.com/client/new හි නව යෙදුමක් සාදන්න. “Yandex.Passport API” කොටසේ පහත සඳහන් අවසරයන් තෝරන්න: “විද්යුත් තැපැල් ලිපිනය වෙත ප්රවේශය”, “පරිශීලක අවතාර් වෙත ප්රවේශය” සහ “පරිශීලක නාමය, මුල් නම සහ වාසගම, ස්ත්රී පුරුෂ භාවය”
diff --git a/options/locale/locale_sv-SE.ini b/options/locale/locale_sv-SE.ini
index 9234e9aa58..5fe6288ad6 100644
--- a/options/locale/locale_sv-SE.ini
+++ b/options/locale/locale_sv-SE.ini
@@ -779,7 +779,6 @@ editor.or=eller
editor.cancel_lower=Avbryt
editor.commit_signed_changes=Committa signerade ändringar
editor.commit_changes=Checka in ändringar
-editor.add_tmpl=Lägg till ''
editor.commit_message_desc=Lägg till en valfri utökad beskrivning…
editor.commit_directly_to_this_branch=Checka in direkt till grenen %s.
editor.create_new_branch=Skapa en ny gren för denna incheckning och påbörja en hämtningsbegäran.
@@ -1801,12 +1800,10 @@ auths.enable_auto_register=Aktivera Automatisk Registrering
auths.tips=Tips
auths.tips.oauth2.general=OAuth2 Autensiering
auths.tip.oauth2_provider=OAuth2 leverantör
-auths.tip.bitbucket=Registrera en ny OAuth konsument på https://bitbucket.org/account/user//oauth-consumers/new och lägg till behörighet 'Account' - 'Read'
auths.tip.dropbox=Skapa en ny applikation på https://www.dropbox.com/developers/apps
auths.tip.facebook=Registrera en ny appliaktion på https://developers.facebook.com/apps och lägg till produkten ”Facebook-inloggning”
auths.tip.github=Registrera en ny OAuth applikation på https://github.com/settings/applications/new
auths.tip.google_plus=Erhåll inloggningsuppgifter för OAuth2 från Google API-konsolen på https://console.developers.google.com/
-auths.tip.openid_connect=Använd OpenID Connect Discovery länken (/.well-known/openid-configuration) för att ange slutpunkterna
auths.tip.twitter=Gå till https://dev.twitter.com/app, skapa en applikation och försäkra att alternativet "Allow this application to be used to Sign in with Twitter" är aktiverat
auths.tip.discord=Registrera en ny applikation på https://discordapp.com/developers/applications/me
auths.edit=Redigera autensieringskälla
diff --git a/options/locale/locale_tr-TR.ini b/options/locale/locale_tr-TR.ini
index 119e1ef150..acc21d24e1 100644
--- a/options/locale/locale_tr-TR.ini
+++ b/options/locale/locale_tr-TR.ini
@@ -651,7 +651,6 @@ cancel=İptal
language=Dil
ui=Tema
hidden_comment_types=Gizli yorum türleri
-hidden_comment_types_description=Burada işaretlenen yorum türleri konu sayfalarında görüntülenmeyecektir. Örneğin "Etiket" seçildiğinde tüm ", ekledi/çıkardı" yorumları kalkacaktır.
hidden_comment_types.ref_tooltip=Bu konuya başka konu/işlem tarafından değinilen yorumlar…
hidden_comment_types.issue_ref_tooltip=Kullanıcının konuyla ilişkili dalı/etiketi değiştirdiği yorumlar
comment_type_group_reference=Referans
@@ -1214,7 +1213,6 @@ editor.or=veya
editor.cancel_lower=İptal
editor.commit_signed_changes=İmzalı Değişiklikleri İşle
editor.commit_changes=Değişiklikleri Uygula
-editor.add_tmpl='' eklendi
editor.add=%s Ekle
editor.update=%s Güncelle
editor.delete=%s Sil
@@ -2970,13 +2968,11 @@ auths.tips=İpuçları
auths.tips.oauth2.general=OAuth2 Kimlik Doğrulama
auths.tips.oauth2.general.tip=Yeni bir OAuth2 kimlik doğrulama kaydederken, geri çağırma/yönlendirme URL'si şu olmalıdır:
auths.tip.oauth2_provider=OAuth2 Sağlayıcısı
-auths.tip.bitbucket=https://bitbucket.org/account/user//oauth-consumers/new adında yeni bir OAuth tüketicisi kaydedin ve 'Hesap' - 'Oku' iznini ekleyin
auths.tip.nextcloud=Aşağıdaki "Ayarlar -> Güvenlik -> OAuth 2.0 istemcisi" menüsünü kullanarak örneğinize yeni bir OAuth tüketicisi kaydedin
auths.tip.dropbox=https://www.dropbox.com/developers/apps adresinde yeni bir uygulama oluştur
auths.tip.facebook=https://developers.facebook.com/apps adresinde yeni bir uygulama kaydedin ve "Facebook Giriş" ürününü ekleyin
auths.tip.github=https://github.com/settings/applications/new adresinde yeni bir OAuth uygulaması kaydedin
auths.tip.google_plus=OAuth2 istemci kimlik bilgilerini https://console.developers.google.com/ adresindeki Google API konsolundan edinin
-auths.tip.openid_connect=Bitiş noktalarını belirlemek için OpenID Connect Discovery URL'sini kullanın (/.well-known/openid-configuration)
auths.tip.twitter=https://dev.twitter.com/apps adresine gidin, bir uygulama oluşturun ve “Bu uygulamanın Twitter ile oturum açmak için kullanılmasına izin ver” seçeneğinin etkin olduğundan emin olun
auths.tip.discord=https://discordapp.com/developers/applications/me adresinde yeni bir uygulama kaydedin
auths.tip.gitea=Yeni bir OAuth2 uygulaması kaydedin. Rehber https://docs.gitea.com/development/oauth2-provider adresinde bulunabilir
diff --git a/options/locale/locale_uk-UA.ini b/options/locale/locale_uk-UA.ini
index e8a3acedda..613f39b3c9 100644
--- a/options/locale/locale_uk-UA.ini
+++ b/options/locale/locale_uk-UA.ini
@@ -955,7 +955,6 @@ editor.or=або
editor.cancel_lower=Скасувати
editor.commit_signed_changes=Внести підписані зміни
editor.commit_changes=Закомітити зміни
-editor.add_tmpl=Додати ''
editor.commit_message_desc=Додати необов'язковий розширений опис…
editor.signoff_desc=Додатиь Signed-off-by комітом в конці повідомлення журналу комітів.
editor.commit_directly_to_this_branch=Зробіть коміт прямо в гілку %s.
@@ -2306,13 +2305,11 @@ auths.sspi_default_language_helper=Типова мова для користув
auths.tips=Поради
auths.tips.oauth2.general=OAuth2 автентифікація
auths.tip.oauth2_provider=Постачальник OAuth2
-auths.tip.bitbucket=Створіть OAuth URI на сторінці https://bitbucket.org/account/user//oauth-consumers/new і додайте права 'Account' - 'Read'
auths.tip.nextcloud=`Зареєструйте нового споживача OAuth у вашому екземплярі за допомогою наступного меню "Налаштування -> Безпека -> клієнт OAuth 2.0"`
auths.tip.dropbox=Додайте новий додаток на https://www.dropbox.com/developers/apps
auths.tip.facebook=`Створіть новий додаток на https://developers.facebook.com/apps і додайте модуль "Facebook Login"`
auths.tip.github=Додайте OAuth додаток на https://github.com/settings/applications/new
auths.tip.google_plus=Отримайте облікові дані клієнта OAuth2 в консолі Google API на сторінці https://console.developers.google.com/
-auths.tip.openid_connect=Використовуйте OpenID Connect Discovery URL (/.well-known/openid-configuration) для автоматичної настройки входу OAuth
auths.tip.twitter=Перейдіть на https://dev.twitter.com/apps, створіть програму і переконайтеся, що включена опція «Дозволити цю програму для входу в систему за допомогою Twitter»
auths.tip.discord=Зареєструйте новий додаток на https://discordapp.com/developers/applications/me
auths.tip.yandex=`Створіть нову програму в https://oauth.yandex.com/client/new. Виберіть наступні дозволи з "Yandex. assport API": "Доступ до адреси електронної пошти", "Доступ до аватара" і "Доступ до імені користувача, імені та прізвища, статі"`
diff --git a/options/locale/locale_zh-CN.ini b/options/locale/locale_zh-CN.ini
index 78460ad2f8..fcc34e9177 100644
--- a/options/locale/locale_zh-CN.ini
+++ b/options/locale/locale_zh-CN.ini
@@ -164,8 +164,6 @@ search=搜索...
type_tooltip=搜索类型
fuzzy=模糊
fuzzy_tooltip=包含近似匹配搜索词的结果
-match=匹配
-match_tooltip=仅包含精确匹配搜索词的结果
repo_kind=搜索仓库...
user_kind=搜索用户...
org_kind=搜索组织...
@@ -714,7 +712,6 @@ cancel=取消操作
language=界面语言
ui=主题
hidden_comment_types=隐藏的评论类型
-hidden_comment_types_description=此处选中的注释类型不会显示在问题页面中。比如,勾选”标签“删除所有 " 添加/删除的 " 注释。
hidden_comment_types.ref_tooltip=注释此问题在何处被提及过,如另一个问题、代码提交等
hidden_comment_types.issue_ref_tooltip=注释用户在何处更改了与此问题相关联的分支/标签
comment_type_group_reference=引用
@@ -1289,7 +1286,6 @@ editor.or=或
editor.cancel_lower=取消
editor.commit_signed_changes=提交已签名的更改
editor.commit_changes=提交变更
-editor.add_tmpl=添加 ''
editor.add=添加 %s
editor.update=更新 %s
editor.delete=删除 %s
@@ -3087,14 +3083,12 @@ auths.tips=帮助提示
auths.tips.oauth2.general=OAuth2 认证
auths.tips.oauth2.general.tip=当注册新的 OAuth2 身份验证时,回调/重定向 URL 应该是:
auths.tip.oauth2_provider=OAuth2 提供程序
-auths.tip.bitbucket=`在 https://bitbucket.org/account/user//oauth-consumers/new 注册新的 OAuth 消费者同时添加权限"帐户"-"读"`
auths.tip.nextcloud=使用下面的菜单“设置(Settings) -> 安全(Security) -> OAuth 2.0 client”在您的实例上注册一个新的 OAuth 客户端。
auths.tip.dropbox=在 https://www.dropbox.com/developers/apps 上创建一个新的应用程序
auths.tip.facebook=`在 https://developers.facebook.com/apps 注册一个新的应用,并添加产品"Facebook 登录"`
auths.tip.github=在 https://github.com/settings/applications/new 注册一个 OAuth 应用程序
auths.tip.gitlab_new=在 https://gitlab.com/-/profile/applications 注册一个新的应用
auths.tip.google_plus=从谷歌 API 控制台 (https://console.developers.google.com/) 获得 OAuth2 客户端凭据
-auths.tip.openid_connect=使用 OpenID 连接发现 URL (/.well-known/openid-configuration) 来指定终点
auths.tip.twitter=访问 https://dev.twitter.com/apps,创建应用并确保启用了"允许此应用程序用于登录 Twitter"的选项。
auths.tip.discord=在 https://discordapp.com/developers/applications/me 上注册新应用程序
auths.tip.gitea=注册一个新的 OAuth2 应用程序。可以访问 https://docs.gitea.com/development/oauth2-provider 查看帮助
diff --git a/options/locale/locale_zh-HK.ini b/options/locale/locale_zh-HK.ini
index d4b65239a6..2dbdeb2bae 100644
--- a/options/locale/locale_zh-HK.ini
+++ b/options/locale/locale_zh-HK.ini
@@ -809,7 +809,6 @@ auths.tip.oauth2_provider=OAuth2 提供者
auths.tip.dropbox=建立新 App 在 https://www.dropbox.com/developers/apps
auths.tip.facebook=`在 https://developers.facebook.com/apps 註冊一個新的應用,並且新增一個產品 "Facebook Login"`
auths.tip.github=在 https://github.com/settings/applications/new 註冊一個新的 OAuth 應用程式
-auths.tip.openid_connect=使用 OpenID 連接探索 URL (/.well-known/openid-configuration) 來指定節點
auths.delete=刪除認證來源
auths.delete_auth_title=刪除認證來源
diff --git a/options/locale/locale_zh-TW.ini b/options/locale/locale_zh-TW.ini
index 0447a7d8b7..3e7bd4ae20 100644
--- a/options/locale/locale_zh-TW.ini
+++ b/options/locale/locale_zh-TW.ini
@@ -1103,7 +1103,6 @@ editor.or=或
editor.cancel_lower=取消
editor.commit_signed_changes=提交簽署過的變更
editor.commit_changes=提交變更
-editor.add_tmpl=新增「」
editor.add=新增 %s
editor.update=更新 %s
editor.delete=刪除 %s
@@ -2704,13 +2703,11 @@ auths.sspi_default_language_helper=SSPI 認證方法自動建立之使用者的
auths.tips=幫助提示
auths.tips.oauth2.general=OAuth2 認證
auths.tip.oauth2_provider=OAuth2 提供者
-auths.tip.bitbucket=註冊新的 OAuth 客戶端並加入權限「Account - Read」。網址:https://bitbucket.org/account/user//oauth-consumers/new
auths.tip.nextcloud=在您的執行個體中,於選單「設定 -> 安全性 -> OAuth 2.0 客戶端」註冊新的 OAuth 客戶端
auths.tip.dropbox=建立新的 App。網址:https://www.dropbox.com/developers/apps
auths.tip.facebook=註冊新的應用程式並新增產品「Facebook 登入」。網址:https://developers.facebook.com/apps
auths.tip.github=註冊新的 OAuth 應用程式。網址:https://github.com/settings/applications/new
auths.tip.google_plus=從 Google API 控制台取得 OAuth2 用戶端憑證。網址:https://console.developers.google.com/
-auths.tip.openid_connect=使用 OpenID 連接探索 URL (/.well-known/openid-configuration) 來指定節點
auths.tip.twitter=建立應用程式並確保有啟用「Allow this application to be used to Sign in with Twitter」。網址:https://dev.twitter.com/apps
auths.tip.discord=註冊新的應用程式。網址:https://discordapp.com/developers/applications/me
auths.tip.yandex=建立新的應用程式,從「Yandex.Passport API」區塊選擇「Access to email address」、「Access to user avatar」和「Access to username, first name and surname, gender」。網址:https://oauth.yandex.com/client/new
From 2da1dcfc21afe6f5373e4271e9ddcc7f31d6695b Mon Sep 17 00:00:00 2001
From: Lunny Xiao
Date: Thu, 18 Apr 2024 11:16:20 +0800
Subject: [PATCH 048/556] Add an api test for updating user (#30539)
Fix #30518
---
tests/integration/api_user_update_test.go | 25 +++++++++++++++++++++++
1 file changed, 25 insertions(+)
create mode 100644 tests/integration/api_user_update_test.go
diff --git a/tests/integration/api_user_update_test.go b/tests/integration/api_user_update_test.go
new file mode 100644
index 0000000000..af5481cfd5
--- /dev/null
+++ b/tests/integration/api_user_update_test.go
@@ -0,0 +1,25 @@
+// Copyright 2024 The Gitea Authors. All rights reserved.
+// SPDX-License-Identifier: MIT
+
+package integration
+
+import (
+ "net/http"
+ "testing"
+
+ auth_model "code.gitea.io/gitea/models/auth"
+ "code.gitea.io/gitea/tests"
+)
+
+func TestAPIUpdateUser(t *testing.T) {
+ defer tests.PrepareTestEnv(t)()
+
+ normalUsername := "user2"
+ session := loginUser(t, normalUsername)
+ token := getTokenForLoggedInUser(t, session, auth_model.AccessTokenScopeWriteUser)
+
+ req := NewRequestWithJSON(t, "PATCH", "/api/v1/user/settings", map[string]string{
+ "website": "https://gitea.com",
+ }).AddTokenAuth(token)
+ MakeRequest(t, req, http.StatusOK)
+}
From 49b80f8ac1cf9f0b56da0c73d0f34ef030f4c447 Mon Sep 17 00:00:00 2001
From: silverwind
Date: Thu, 18 Apr 2024 10:06:56 +0200
Subject: [PATCH 049/556] Disable enter key for accepting code completion in
Monaco (#30548)
Fixes https://github.com/go-gitea/gitea/issues/28114 and behaviour
matches vscode on desktop as well.
Co-authored-by: Giteabot
---
web_src/js/features/codeeditor.js | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/web_src/js/features/codeeditor.js b/web_src/js/features/codeeditor.js
index 4fb8bb9e63..f5e4e74dc6 100644
--- a/web_src/js/features/codeeditor.js
+++ b/web_src/js/features/codeeditor.js
@@ -112,6 +112,10 @@ export async function createMonaco(textarea, filename, editorOpts) {
...other,
});
+ monaco.editor.addKeybindingRules([
+ {keybinding: monaco.KeyCode.Enter, command: null}, // disable enter from accepting code completion
+ ]);
+
const model = editor.getModel();
model.onDidChangeContent(() => {
textarea.value = editor.getValue({preserveBOM: true});
From 31538133c32009532897989ad623067bd224f924 Mon Sep 17 00:00:00 2001
From: silverwind
Date: Thu, 18 Apr 2024 10:34:23 +0200
Subject: [PATCH 050/556] Fix border-radius on view, blame and code search
(#30545)
Fixes: https://github.com/go-gitea/gitea/issues/30540
1. Fix all these boxes by adding `bottom attached` and removing a
problematic CSS rule:
2. Change the "last commit" box to `ui segment` which has correct
border-radius. Also included is a tiny tweak to make author name ellipse
instead of wrap.
Co-authored-by: Giteabot
---
templates/repo/blame.tmpl | 2 +-
templates/repo/settings/lfs_file.tmpl | 2 +-
templates/repo/view_file.tmpl | 4 ++--
web_src/css/repo.css | 2 +-
4 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/templates/repo/blame.tmpl b/templates/repo/blame.tmpl
index ccef8e4b38..4ad3ed85c9 100644
--- a/templates/repo/blame.tmpl
+++ b/templates/repo/blame.tmpl
@@ -28,7 +28,7 @@
{{if not (or .IsMarkup .IsRenderedHTML)}}
{{template "repo/unicode_escape_prompt" dict "EscapeStatus" .EscapeStatus "root" $}}
{{end}}
diff --git a/web_src/css/repo.css b/web_src/css/repo.css
index 882d86c4f6..b7da9ce6e0 100644
--- a/web_src/css/repo.css
+++ b/web_src/css/repo.css
@@ -430,7 +430,6 @@ td .commit-summary {
padding: 0 !important;
}
-.non-diff-file-content .attached.segment,
.non-diff-file-content .pdfobject {
border-radius: 0 0 var(--border-radius) var(--border-radius);
}
@@ -2282,6 +2281,7 @@ tbody.commit-list {
.author-wrapper {
max-width: 180px;
align-self: center;
+ white-space: nowrap;
}
/* in the commit list, messages can wrap so we can use inline */
From d4ec6b3d16496ce3b479d5a08f79823122dc2b7b Mon Sep 17 00:00:00 2001
From: silverwind
Date: Thu, 18 Apr 2024 11:01:06 +0200
Subject: [PATCH 051/556] Add form field id generation, remove duplicated ids
(#30546)
Fixes: https://github.com/go-gitea/gitea/issues/30384
On repo settings page, there id `repo_name` was used 5 times on the same
page, some in modal and such. I think we are better off just
auto-generating these IDs in the future so that labels link up with
their form element.
Ideally this id generation would be done in backend in a subtemplate,
but seeing that we already have similar JS patches for checkboxes, I
took the easy path for now.
I also checked that these `#repo_name` were not in use in JS and the
only case where this id appears in JS is on the migration page where
it's still there.
---------
Co-authored-by: Giteabot
---
templates/repo/settings/options.tmpl | 20 ++++++++++----------
web_src/js/modules/fomantic.js | 2 ++
web_src/js/modules/fomantic/base.js | 13 +++++++++++++
web_src/js/modules/fomantic/checkbox.js | 15 ++-------------
web_src/js/modules/fomantic/form.js | 13 +++++++++++++
5 files changed, 40 insertions(+), 23 deletions(-)
create mode 100644 web_src/js/modules/fomantic/form.js
diff --git a/templates/repo/settings/options.tmpl b/templates/repo/settings/options.tmpl
index c0411cfc56..0cd2201c4b 100644
--- a/templates/repo/settings/options.tmpl
+++ b/templates/repo/settings/options.tmpl
@@ -9,8 +9,8 @@
{{.CsrfTokenHtml}}
diff --git a/web_src/js/modules/fomantic.js b/web_src/js/modules/fomantic.js
index d205c2b2ee..c04bc6e863 100644
--- a/web_src/js/modules/fomantic.js
+++ b/web_src/js/modules/fomantic.js
@@ -1,6 +1,7 @@
import $ from 'jquery';
import {initFomanticApiPatch} from './fomantic/api.js';
import {initAriaCheckboxPatch} from './fomantic/checkbox.js';
+import {initAriaFormFieldPatch} from './fomantic/form.js';
import {initAriaDropdownPatch} from './fomantic/dropdown.js';
import {initAriaModalPatch} from './fomantic/modal.js';
import {initFomanticTransition} from './fomantic/transition.js';
@@ -27,6 +28,7 @@ export function initGiteaFomantic() {
// Use the patches to improve accessibility, these patches are designed to be as independent as possible, make it easy to modify or remove in the future.
initAriaCheckboxPatch();
+ initAriaFormFieldPatch();
initAriaDropdownPatch();
initAriaModalPatch();
}
diff --git a/web_src/js/modules/fomantic/base.js b/web_src/js/modules/fomantic/base.js
index c4a01038ba..7574fdd25c 100644
--- a/web_src/js/modules/fomantic/base.js
+++ b/web_src/js/modules/fomantic/base.js
@@ -3,3 +3,16 @@ let ariaIdCounter = 0;
export function generateAriaId() {
return `_aria_auto_id_${ariaIdCounter++}`;
}
+
+export function linkLabelAndInput(label, input) {
+ const labelFor = label.getAttribute('for');
+ const inputId = input.getAttribute('id');
+
+ if (inputId && !labelFor) { // missing "for"
+ label.setAttribute('for', inputId);
+ } else if (!inputId && !labelFor) { // missing both "id" and "for"
+ const id = generateAriaId();
+ input.setAttribute('id', id);
+ label.setAttribute('for', id);
+ }
+}
diff --git a/web_src/js/modules/fomantic/checkbox.js b/web_src/js/modules/fomantic/checkbox.js
index 7f2b340296..ed77406cc3 100644
--- a/web_src/js/modules/fomantic/checkbox.js
+++ b/web_src/js/modules/fomantic/checkbox.js
@@ -1,4 +1,4 @@
-import {generateAriaId} from './base.js';
+import {linkLabelAndInput} from './base.js';
export function initAriaCheckboxPatch() {
// link the label and the input element so it's clickable and accessible
@@ -7,18 +7,7 @@ export function initAriaCheckboxPatch() {
const label = el.querySelector('label');
const input = el.querySelector('input');
if (!label || !input) continue;
- const inputId = input.getAttribute('id');
- const labelFor = label.getAttribute('for');
-
- if (inputId && !labelFor) { // missing "for"
- label.setAttribute('for', inputId);
- } else if (!inputId && !labelFor) { // missing both "id" and "for"
- const id = generateAriaId();
- input.setAttribute('id', id);
- label.setAttribute('for', id);
- } else {
- continue;
- }
+ linkLabelAndInput(label, input);
el.setAttribute('data-checkbox-patched', 'true');
}
}
diff --git a/web_src/js/modules/fomantic/form.js b/web_src/js/modules/fomantic/form.js
new file mode 100644
index 0000000000..3bb0058902
--- /dev/null
+++ b/web_src/js/modules/fomantic/form.js
@@ -0,0 +1,13 @@
+import {linkLabelAndInput} from './base.js';
+
+export function initAriaFormFieldPatch() {
+ // link the label and the input element so it's clickable and accessible
+ for (const el of document.querySelectorAll('.ui.form .field')) {
+ if (el.hasAttribute('data-field-patched')) continue;
+ const label = el.querySelector(':scope > label');
+ const input = el.querySelector(':scope > input');
+ if (!label || !input) continue;
+ linkLabelAndInput(label, input);
+ el.setAttribute('data-field-patched', 'true');
+ }
+}
From d1ba5f431b09cf2a1f814ce0b3feb4c1d4755844 Mon Sep 17 00:00:00 2001
From: wxiaoguang
Date: Thu, 18 Apr 2024 17:36:19 +0800
Subject: [PATCH 052/556] Some following up changes for routes (#30550)
1. Switch back to the old order for `reqRepoAdmin, context.RepoRef()`
2. Add a routing function info for global NotFound
---
routers/web/web.go | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)
diff --git a/routers/web/web.go b/routers/web/web.go
index f9164568ed..a6a4c1d987 100644
--- a/routers/web/web.go
+++ b/routers/web/web.go
@@ -54,10 +54,7 @@ import (
"github.com/prometheus/client_golang/prometheus"
)
-const (
- // GzipMinSize represents min size to compress for the body size of response
- GzipMinSize = 1400
-)
+const GzipMinSize = 1400 // min size to compress for the body size of response
// optionsCorsHandler return a http handler which sets CORS options if enabled by config, it blocks non-CORS OPTIONS requests.
func optionsCorsHandler() func(next http.Handler) http.Handler {
@@ -1115,7 +1112,7 @@ func registerRoutes(m *web.Route) {
m.Post("/cancel", repo.MigrateCancelPost)
})
},
- reqSignIn, context.RepoAssignment, context.RepoRef(), reqRepoAdmin,
+ reqSignIn, context.RepoAssignment, reqRepoAdmin, context.RepoRef(),
ctxDataSet("PageIsRepoSettings", true, "LFSStartServer", setting.LFS.StartServer),
)
// end "/{username}/{reponame}/settings"
@@ -1613,6 +1610,7 @@ func registerRoutes(m *web.Route) {
m.NotFound(func(w http.ResponseWriter, req *http.Request) {
ctx := context.GetWebContext(req)
+ routing.UpdateFuncInfo(ctx, routing.GetFuncInfo(ctx.NotFound, "GlobalNotFound"))
ctx.NotFound("", nil)
})
}
From 86d4c8a4662e9ab49888569d77529d2d22292e6b Mon Sep 17 00:00:00 2001
From: Jerry Jacobs
Date: Thu, 18 Apr 2024 13:22:06 +0200
Subject: [PATCH 053/556] Fixup app.example.ini for task section, which is now
queue.task (#30555)
Config section `[task]` has been deprecated in favor of `[queue.task]`
---------
Co-authored-by: wxiaoguang
---
custom/conf/app.example.ini | 16 ----------------
.../administration/config-cheat-sheet.en-us.md | 8 --------
.../administration/config-cheat-sheet.zh-cn.md | 9 ---------
3 files changed, 33 deletions(-)
diff --git a/custom/conf/app.example.ini b/custom/conf/app.example.ini
index 32b51fd7c6..b4e330184e 100644
--- a/custom/conf/app.example.ini
+++ b/custom/conf/app.example.ini
@@ -2377,22 +2377,6 @@ LEVEL = Info
;; Enable issue by repository metrics; default is false
;ENABLED_ISSUE_BY_REPOSITORY = false
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;[task]
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;; Task queue type, could be `channel` or `redis`.
-;QUEUE_TYPE = channel
-;;
-;; Task queue length, available only when `QUEUE_TYPE` is `channel`.
-;QUEUE_LENGTH = 1000
-;;
-;; Task queue connection string, available only when `QUEUE_TYPE` is `redis`.
-;; If there is a password of redis, use `redis://127.0.0.1:6379/0?pool_size=100&idle_timeout=180s` or `redis+cluster://127.0.0.1:6379/0?pool_size=100&idle_timeout=180s` for `redis-clsuter`.
-;QUEUE_CONN_STR = "redis://127.0.0.1:6379/0?pool_size=100&idle_timeout=180s"
-
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;[migrations]
diff --git a/docs/content/administration/config-cheat-sheet.en-us.md b/docs/content/administration/config-cheat-sheet.en-us.md
index ff8bcb066c..9328177f50 100644
--- a/docs/content/administration/config-cheat-sheet.en-us.md
+++ b/docs/content/administration/config-cheat-sheet.en-us.md
@@ -1198,14 +1198,6 @@ in this mapping or the filetype using heuristics.
- `DEFAULT_UI_LOCATION`: Default location of time on the UI, so that we can display correct user's time on UI. i.e. Asia/Shanghai
-## Task (`task`)
-
-Task queue configuration has been moved to `queue.task`. However, the below configuration values are kept for backwards compatibility:
-
-- `QUEUE_TYPE`: **channel**: Task queue type, could be `channel` or `redis`.
-- `QUEUE_LENGTH`: **1000**: Task queue length, available only when `QUEUE_TYPE` is `channel`.
-- `QUEUE_CONN_STR`: **redis://127.0.0.1:6379/0**: Task queue connection string, available only when `QUEUE_TYPE` is `redis`. If redis needs a password, use `redis://123@127.0.0.1:6379/0` or `redis+cluster://123@127.0.0.1:6379/0`.
-
## Migrations (`migrations`)
- `MAX_ATTEMPTS`: **3**: Max attempts per http/https request on migrations.
diff --git a/docs/content/administration/config-cheat-sheet.zh-cn.md b/docs/content/administration/config-cheat-sheet.zh-cn.md
index 759f39b576..e4945dd1c1 100644
--- a/docs/content/administration/config-cheat-sheet.zh-cn.md
+++ b/docs/content/administration/config-cheat-sheet.zh-cn.md
@@ -1128,15 +1128,6 @@ ALLOW_DATA_URI_IMAGES = true
- `DEFAULT_UI_LOCATION`:在 UI 上的默认时间位置,以便我们可以在 UI 上显示正确的用户时间。例如:Asia/Shanghai
-## 任务 (`task`)
-
-任务队列配置已移动到 `queue.task`。然而,以下配置值仍保留以确保向后兼容:
-
-- `QUEUE_TYPE`:**channel**:任务队列类型,可以是 `channel` 或 `redis`。
-- `QUEUE_LENGTH`:**1000**:任务队列长度,仅在 `QUEUE_TYPE` 为 `channel` 时可用。
-- `QUEUE_CONN_STR`:**redis://127.0.0.1:6379/0**:任务队列连接字符串,仅在 `QUEUE_TYPE` 为 `redis` 时可用。
- 如果 redis 需要密码,使用 `redis://123@127.0.0.1:6379/0` 或 `redis+cluster://123@127.0.0.1:6379/0`。
-
## 迁移 (`migrations`)
- `MAX_ATTEMPTS`:**3**:每次 http/https 请求的最大尝试次数(用于迁移)。
From d0e07083559180b124a08359fcc72f9ef695e723 Mon Sep 17 00:00:00 2001
From: wxiaoguang
Date: Fri, 19 Apr 2024 00:45:50 +0800
Subject: [PATCH 054/556] Refactor and fix archive link bug (#30535)
Regression of #29920
Fixes: #30569
Also this is a rewriting to eliminate the remaining jQuery usages from code.
Co-authored-by: Giteabot
---
web_src/js/features/repo-common.js | 54 ++++++++++++------------------
web_src/js/utils/dom.js | 4 +++
2 files changed, 26 insertions(+), 32 deletions(-)
diff --git a/web_src/js/features/repo-common.js b/web_src/js/features/repo-common.js
index b750addb07..88aa93d850 100644
--- a/web_src/js/features/repo-common.js
+++ b/web_src/js/features/repo-common.js
@@ -1,45 +1,35 @@
import $ from 'jquery';
-import {hideElem, showElem} from '../utils/dom.js';
+import {hideElem, queryElems, showElem} from '../utils/dom.js';
import {POST} from '../modules/fetch.js';
+import {showErrorToast} from '../modules/toast.js';
+import {sleep} from '../utils.js';
-async function getArchive($target, url, first) {
- const dropdownBtn = $target[0].closest('.ui.dropdown.button') ?? $target[0].closest('.ui.dropdown.btn');
-
+async function onDownloadArchive(e) {
+ e.preventDefault();
+ // there are many places using the "archive-link", eg: the dropdown on the repo code page, the release list
+ const el = e.target.closest('a.archive-link[href]');
+ const targetLoading = el.closest('.ui.dropdown') ?? el;
+ targetLoading.classList.add('is-loading', 'loading-icon-2px');
try {
- dropdownBtn.classList.add('is-loading');
- const response = await POST(url);
- if (response.status === 200) {
- const data = await response.json();
- if (!data) {
- // XXX Shouldn't happen?
- dropdownBtn.classList.remove('is-loading');
- return;
- }
+ for (let tryCount = 0; ;tryCount++) {
+ const response = await POST(el.href);
+ if (!response.ok) throw new Error(`Invalid server response: ${response.status}`);
- if (!data.complete) {
- // Wait for only three quarters of a second initially, in case it's
- // quickly archived.
- setTimeout(() => {
- getArchive($target, url, false);
- }, first ? 750 : 2000);
- } else {
- // We don't need to continue checking.
- dropdownBtn.classList.remove('is-loading');
- window.location.href = url;
- }
+ const data = await response.json();
+ if (data.complete) break;
+ await sleep(Math.min((tryCount + 1) * 750, 2000));
}
- } catch {
- dropdownBtn.classList.remove('is-loading');
+ window.location.href = el.href; // the archive is ready, start real downloading
+ } catch (e) {
+ console.error(e);
+ showErrorToast(`Failed to download the archive: ${e}`, {duration: 2500});
+ } finally {
+ targetLoading.classList.remove('is-loading', 'loading-icon-2px');
}
}
export function initRepoArchiveLinks() {
- $('.archive-link').on('click', function (event) {
- event.preventDefault();
- const url = this.getAttribute('href');
- if (!url) return;
- getArchive($(event.target), url, true);
- });
+ queryElems('a.archive-link[href]', (el) => el.addEventListener('click', onDownloadArchive));
}
export function initRepoCloneLink() {
diff --git a/web_src/js/utils/dom.js b/web_src/js/utils/dom.js
index fb23a71725..a48510b191 100644
--- a/web_src/js/utils/dom.js
+++ b/web_src/js/utils/dom.js
@@ -69,6 +69,10 @@ export function queryElemChildren(parent, selector = '*', fn) {
return applyElemsCallback(parent.querySelectorAll(`:scope > ${selector}`), fn);
}
+export function queryElems(selector, fn) {
+ return applyElemsCallback(document.querySelectorAll(selector), fn);
+}
+
export function onDomReady(cb) {
if (document.readyState === 'loading') {
document.addEventListener('DOMContentLoaded', cb);
From 354705450a410329d253023d2c66ef6d68ecc046 Mon Sep 17 00:00:00 2001
From: silverwind
Date: Thu, 18 Apr 2024 20:54:40 +0200
Subject: [PATCH 055/556] Add a few root files to lint-spell (#30530)
Files in root were not linted, add them. No new violations.
---
CHANGELOG.md | 72 ++++++++++++++++++++++++++--------------------------
Makefile | 4 +--
2 files changed, 38 insertions(+), 38 deletions(-)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index e119d0bec0..1c11ad4a7a 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -159,11 +159,11 @@ been added to each release, please refer to the [blog](https://blog.gitea.com).
* Fix the issue ref rendering for wiki (#28556) (#28559)
* Fix duplicate ID when deleting repo (#28520) (#28528)
* Only check online runner when detecting matching runners in workflows (#28286) (#28512)
- * Initalize stroage for orphaned repository doctor (#28487) (#28490)
+ * Initialize stroage for orphaned repository doctor (#28487) (#28490)
* Fix possible nil pointer access (#28428) (#28440)
* Don't show unnecessary citation JS error on UI (#28433) (#28437)
* DOCS
- * Update actions document about comparsion as Github Actions (#28560) (#28564)
+ * Update actions document about comparison as Github Actions (#28560) (#28564)
* Fix documents for "custom/public/assets/" (#28465) (#28467)
* MISC
* Fix inperformant query on retrifing review from database. (#28552) (#28562)
@@ -673,7 +673,7 @@ been added to each release, please refer to the [blog](https://blog.gitea.com).
* Docs: template variables (#26547)
* Update index doc (#26455)
* Update zh-cn documentation (#26406)
- * Fix typos and grammer problems for actions documentation (#26328)
+ * Fix typos and grammar problems for actions documentation (#26328)
* Update documentation for 1.21 actions (#26317)
* Doc update swagger doc for POST /orgs/{org}/teams (#26155)
* Doc sync authentication.md to zh-cn (#26117)
@@ -762,7 +762,7 @@ been added to each release, please refer to the [blog](https://blog.gitea.com).
* Fix incorrect color of selected assignees when create issue (#26324) (#26372)
* Display human-readable text instead of cryptic filemodes (#26352) (#26358)
* Hide `last indexed SHA` when a repo could not be indexed yet (#26340) (#26345)
- * Fix the topic validation rule and suport dots (#26286) (#26303)
+ * Fix the topic validation rule and support dots (#26286) (#26303)
* Fix due date rendering the wrong date in issue (#26268) (#26274)
* Don't autosize textarea in diff view (#26233) (#26244)
* Fix commit compare style (#26209) (#26226)
@@ -989,7 +989,7 @@ been added to each release, please refer to the [blog](https://blog.gitea.com).
* Add dark mode to API Docs (#24971)
* Display file mode for new file and file mode changes (#24966)
* Make the 500 page load themes (#24953)
- * Show `bot` label next to username when rendering autor link if the user is a bot (#24943)
+ * Show `bot` label next to username when rendering author link if the user is a bot (#24943)
* Repo list improvements, fix bold helper classes (#24935)
* Improve queue and logger context (#24924)
* Improve RunMode / dev mode (#24886)
@@ -1384,7 +1384,7 @@ been added to each release, please refer to the [blog](https://blog.gitea.com).
* Replace `drone exec` to `act_runner exec` in test README.md (#24791)
* Update packages overview page (#24730)
* Docs for creating a user to run Gitea on Fedora/RHEL/CentOS (#24725)
- * Move actions as usage's subdirectory and update comparsion zh-cn version (#24719)
+ * Move actions as usage's subdirectory and update comparison zh-cn version (#24719)
* Document `redis-cluster` explicitly in config (#24717)
* Improve reverse-proxy document and fix nginx config bug (#24616)
* Fix broken `README` link (#24546)
@@ -1462,7 +1462,7 @@ been added to each release, please refer to the [blog](https://blog.gitea.com).
* Show visibility status of email in own profile (#23900)
* Refactor authors dropdown (send get request from frontend to avoid long wait time) (#23890)
* Add self to maintainers (#23644)
- * Upgrade to npm lockfile v3 and explicitely set it (#23561)
+ * Upgrade to npm lockfile v3 and explicitly set it (#23561)
* Improve indices for `action` table (#23532)
* Update JS dependencies, Require Node.js 16 (#23528)
* Add init file for Ubuntu (#23362)
@@ -1503,7 +1503,7 @@ been added to each release, please refer to the [blog](https://blog.gitea.com).
* Fix issues list page multiple selection update milestones (#24660) (#24663)
* Fix: release page for empty or non-existing target (#24659)
* Fix close org projects (#24588) (#24591)
- * Refresh the refernce of the closed PR when reopening (#24231) (#24587)
+ * Refresh the references of the closed PR when reopening (#24231) (#24587)
* Fix the permission of team's `Actions` unit issue (#24536) (#24545)
* Bump go.etcd.io/bbolt and blevesearch deps (#23062) (#24519)
* Fix new wiki page mirror (#24518)
@@ -2644,7 +2644,7 @@ been added to each release, please refer to the [blog](https://blog.gitea.com).
* Feeds: render markdown to html (#19058)
* Allow users to self-request a PR review (#19030)
* Allow render HTML with css/js external links (#19017)
- * Fix script compatiable with OpenWrt (#19000)
+ * Fix script compatible with OpenWrt (#19000)
* Support ignore all santize for external renderer (#18984)
* Add note to GPG key response if user has no keys (#18961)
* Improve Stopwatch behavior (#18930)
@@ -2975,7 +2975,7 @@ been added to each release, please refer to the [blog](https://blog.gitea.com).
* Update go-org to v1.6.1 (#18932) (#18933)
* Fix `` html in translation (#18929) (#18931)
* Fix page and missing return on unadopted repos API (#18848) (#18927)
- * Allow adminstrator teams members to see other teams (#18918) (#18919)
+ * Allow administrator teams members to see other teams (#18918) (#18919)
* Don't treat BOM escape sequence as hidden character. (#18909) (#18910)
* Correctly link URLs to users/repos with dashes, dots or underscores (… (#18908)
* Fix redirect when using lowercase repo name (#18775) (#18902)
@@ -3323,7 +3323,7 @@ been added to each release, please refer to the [blog](https://blog.gitea.com).
* Fixed issue merged/closed wording (#17973)
* Return nicer error for ForcePrivate (#17971)
* Fix overflow in commit graph (#17947)
- * Prevent services/mailer/mailer_test.go tests from deleteing data directory (#17941)
+ * Prevent services/mailer/mailer_test.go tests from deleting data directory (#17941)
* Use disable_form_autofill on Codebase and Gitbucket (#17936)
* Fix a panic in NotifyCreateIssueComment (caused by string truncation) (#17928)
* Fix markdown URL parsing (#17924)
@@ -3362,7 +3362,7 @@ been added to each release, please refer to the [blog](https://blog.gitea.com).
* Fixed emoji alias not parsed in links (#16221)
* Calculate label URL on API (#16186)
* TRANSLATION
- * Fix mispelling of starred as stared (#17465)
+ * Fix misspelling of starred as stared (#17465)
* Re-separate the color translation strings (#17390)
* Enable Malayalam, Greek, Persian, Hungarian & Indonesian by default (#16998)
* BUILD
@@ -3554,7 +3554,7 @@ been added to each release, please refer to the [blog](https://blog.gitea.com).
* Correctly return the number of Repositories for Organizations (#16807) (#16911)
* Test if LFS object is accessible (#16865) (#16904)
* Fix git.Blob.DataAsync(): close pipe since we return a NopCloser (#16899) (#16900)
- * Fix dump and restore respository (#16698) (#16898)
+ * Fix dump and restore repository (#16698) (#16898)
* Repare and Improve GetDiffRangeWithWhitespaceBehavior (#16894) (#16895)
* Fix wiki raw commit diff/patch view (#16891) (#16892)
* Ensure wiki repos are all closed (#16886) (#16888)
@@ -4164,7 +4164,7 @@ been added to each release, please refer to the [blog](https://blog.gitea.com).
* Improve Description in new/ edit Project template (#14429)
* Allow ssh-keygen on Windows to detect ssh key type (#14413)
* Display error if twofaSecret cannot be retrieved (#14372)
- * Sort issue search results by revelance (#14353)
+ * Sort issue search results by relevance (#14353)
* Implement ghost comment mitigation (#14349)
* Upgrade blevesearch dependency to v2.0.1 (#14346)
* Add edit, delete and reaction support to code review comments on issue page (#14339)
@@ -4337,7 +4337,7 @@ been added to each release, please refer to the [blog](https://blog.gitea.com).
* BUGFIXES
* Fix race in LFS ContentStore.Put(...) (#14895) (#14913)
* Fix a couple of issues with a feeds (#14897) (#14903)
- * When transfering repository and database transaction failed, rollback the renames (#14864) (#14902)
+ * When transferring repository and database transaction failed, rollback the renames (#14864) (#14902)
* Fix race in local storage (#14888) (#14901)
* Fix 500 on pull view page if user is not loged in (#14885) (#14886)
* DOCS
@@ -4668,7 +4668,7 @@ been added to each release, please refer to the [blog](https://blog.gitea.com).
* Render the git graph on the server (#12333)
* Fix clone panel in wiki position not always align right (#12326)
* Rework 'make generate-images' (#12316)
- * Refactor webhook payload convertion (#12310)
+ * Refactor webhook payload conversion (#12310)
* Move jquery-minicolors to npm/webpack (#12305)
* Support use nvarchar for all varchar columns when using mssql (#12269)
* Update Octicons to v10 (#12240)
@@ -4744,7 +4744,7 @@ been added to each release, please refer to the [blog](https://blog.gitea.com).
* Add debug option to hooks (#11624)
* Log slow tests (#11487)
* TRANSLATION
- * Translate two small lables on commit statuse list (#12821)
+ * Translate two small lables on commit statutes list (#12821)
* Make issues.force_push_codes message shorter (#11575)
* BUILD
* Bump min required golang to 1.13 (#12717)
@@ -5123,7 +5123,7 @@ been added to each release, please refer to the [blog](https://blog.gitea.com).
* Add restricted user filter to LDAP authentication (#10600)
* Add Yandex OAuth2 provider (#8335) (#10564)
* Make avatar lookup occur at image request (#10540)
- * Prevent accidential selection of language stats bar (#10537)
+ * Prevent accidental selection of language stats bar (#10537)
* Add fluid-icon (#10491)
* Inform participants on UI too (#10473)
* Build with go 1.14 (and raise minimum go version to 1.12) (#10467)
@@ -5515,7 +5515,7 @@ been added to each release, please refer to the [blog](https://blog.gitea.com).
* Don't link wiki revision to commit (#9244)
* Change review content column to type text in db (#9229)
* Fixed topic regex pattern and added search by topic links after save (#9219)
- * Add language to user API responce (#9215)
+ * Add language to user API response (#9215)
* Correct tooltip message blocked by dependencies (#9211)
* Add SimpleMDE and Fix Image Paste for Issue/Comment Editor (#9197)
* Fix panic when diff (#9187)
@@ -6136,7 +6136,7 @@ WARNING: v1.10.5 is incorrectly tagged targeting 1.12-dev and should __not__ be
* Display original author and URL information when showing migrated issues/comments (#7352)
* Refactor filetype is not allowed errors (#7309)
* switch to use gliderlabs/ssh for builtin server (#7250)
- * Remove settting dependency on modules/session (#7237)
+ * Remove setting dependency on modules/session (#7237)
* Move all mail related codes from models to services/mailer (#7200)
* Support git.PATH entry in app.ini (#6772)
* Support setting cookie domain (#6288)
@@ -6311,7 +6311,7 @@ WARNING: v1.10.5 is incorrectly tagged targeting 1.12-dev and should __not__ be
* Fix markdown invoke sequence (#7513) (#7560)
* Reserve .well-known username (#7638)
* Do not leak secrets via timing side channel (#7364)
- * Ensure that decryption of cookie actually suceeds (#7363)
+ * Ensure that decryption of cookie actually succeeds (#7363)
* FEATURES
* Content API for Creating, Updating, Deleting Files (#6314)
* Enable tls-alpn-01: Use certmanager provided TLSConfig for LetsEncrypt (#7229)
@@ -6533,7 +6533,7 @@ WARNING: v1.10.5 is incorrectly tagged targeting 1.12-dev and should __not__ be
* Change UpdateRepoIndex api to include watchers (#7012)
* Move serv hook functionality & drop GitLogger (#6993)
* Add support of utf8mb4 for mysql (#6992)
- * Make webhook http connections resuable (#6976)
+ * Make webhook http connections reusable (#6976)
* Move xorm logger bridge from log to models so that log module could be a standalone package (#6944)
* Refactor models.NewRepoContext to extract git related codes to modules/git (#6941)
* Remove macaron dependent on models (#6940)
@@ -7104,7 +7104,7 @@ WARNING: v1.10.5 is incorrectly tagged targeting 1.12-dev and should __not__ be
* Fix data race on migrate repository (#5224)
* Fix sqlite and mssql lock (#5214)
* Fix sqlite lock (#5210)
- * Fix: Accept web-command cli flags if web-command is commited (#5200)
+ * Fix: Accept web-command cli flags if web-command is committed (#5200)
* Fix: Add secret to all webhook's payload where it has been missing (#5199)
* Fix race on updatesize (#5190)
* Fix create team, update team missing units (#5188)
@@ -7255,7 +7255,7 @@ WARNING: v1.10.5 is incorrectly tagged targeting 1.12-dev and should __not__ be
* Enforce token on api routes [fixed critical security issue #4357] (#4840)
* Update legacy branch and tag URLs in dashboard to new format (#4812)
* Slack webhook channel name cannot be empty or just contain an hashtag (#4786)
- * Add whitespace handling to PR-comparsion (#4683)
+ * Add whitespace handling to PR-comparison (#4683)
* Make reverse proxy auth optional (#4643)
* MySQL TLS (#4642)
* Make sure to set PR split view when creating/previewing a pull request (#4617)
@@ -7309,7 +7309,7 @@ WARNING: v1.10.5 is incorrectly tagged targeting 1.12-dev and should __not__ be
* Fix markdown image with link (#4675)
* Remove maxlines option for file logger (#5282)
* Fix wrong api request url for instances running in subfolders (#5261) (#5247)
- * Accept web-command cli flags if web-command is commited (#5245) (#5200)
+ * Accept web-command cli flags if web-command is committed (#5245) (#5200)
* Reduce join star, repo_topic, topic tables on repo search, to resolve extra columns problem on MSSQL (#5136) (#5229)
* Fix data race on migrate repository (#5224) (#5230)
* Add secret to all webhook's payload where it has been missing (#5208) (#5199)
@@ -7342,7 +7342,7 @@ WARNING: v1.10.5 is incorrectly tagged targeting 1.12-dev and should __not__ be
* Fix missing release title in webhook (#4783) (#4796)
* User shouldn't be able to approve or reject his/her own PR (#4729)
* Make sure to reset commit count in the cache on mirror syncing (#4720)
- * Fixed bug where team with admin privelege type doesn't get any unit (#4719)
+ * Fixed bug where team with admin privilege type doesn't get any unit (#4719)
* Fix incorrect caption of webhook setting (#4701) (#4717)
* Allow WIP marker to contains < or > (#4709)
* Hide org/create menu item in Dashboard if user has no rights (#4678) (#4680)
@@ -7408,7 +7408,7 @@ WARNING: v1.10.5 is incorrectly tagged targeting 1.12-dev and should __not__ be
* BUGFIXES
* Fix missing release title in webhook (#4783) (#4800)
* Make sure to reset commit count in the cache on mirror syncing (#4770)
- * Fixed bug where team with admin privelege type doesn't get any unit (#4759)
+ * Fixed bug where team with admin privilege type doesn't get any unit (#4759)
* Fix failure on creating pull request with assignees (#4583) (#4727)
* Hide org/create menu item in Dashboard if user has no rights (#4678) (#4686)
* TRANSLATION
@@ -7759,7 +7759,7 @@ WARNING: v1.10.5 is incorrectly tagged targeting 1.12-dev and should __not__ be
* Fix inconsistencies in user settings UI (#2901)
* Fix attachments icon size on zoom in/out (#2853)
* Fix ignored errors in API route (#2850)
- * Fix activity css conflit with semantic ui (#2758)
+ * Fix activity css conflict with semantic ui (#2758)
* Fix notifications tabs according to semantic-ui docs (#2733)
* Fix typos in app.ini (#2732)
* Fix duplicated rel attribute (#2549)
@@ -7957,7 +7957,7 @@ WARNING: v1.10.5 is incorrectly tagged targeting 1.12-dev and should __not__ be
* LFS: Return 404 for unimplemented endpoints (#1330)
* Show a link to password reset from user settings requiring a password (#862)
* Reserve the "explore" user/org name (#1222)
- * Send notifications to partecipants in issue comments (#1217)
+ * Send notifications to participants in issue comments (#1217)
* Improve style of user OpenID setting page (#1324)
* Use font-awesome OpenID icon more (#1320)
* Use readonly input form to show the validated OpenID URI (#1308)
@@ -8155,7 +8155,7 @@ WARNING: v1.10.5 is incorrectly tagged targeting 1.12-dev and should __not__ be
* fix #1501 ssh hangs caused by #1461 (#1513)
* Fix empty file download (#1506)
* Fix broken v27 migration - change mirror interval from int to bigint (#1504)
- * Do not allow commiting to protected branch from online editor (#1502)
+ * Do not allow committing to protected branch from online editor (#1502)
* Add internal routes for ssh hook comands (#1471)
* Fix races within code.gitea.io/git.(*Command).RunInDirTimeoutPipeline (#1465)
* Simple quick fix for #1418 (#1456)
@@ -8183,7 +8183,7 @@ WARNING: v1.10.5 is incorrectly tagged targeting 1.12-dev and should __not__ be
* Make sure both scripts/ can live side by side (#1264)
* Fix nil-dereference bug (#1258)
* rewrite pre-commit, post-commit and options hooks (fixes #1250) (#1257)
- * Commit search appearence fixes (#1254)
+ * Commit search appearance fixes (#1254)
* Fix forget migration for wiki hooks (#1227)
* Fix repo settings external tracker failed and check external urls (#1215)
* Fix 500 caused by branches settings introduced by #1198 (#1214)
@@ -8267,7 +8267,7 @@ WARNING: v1.10.5 is incorrectly tagged targeting 1.12-dev and should __not__ be
* Only run coverage on merges/pushes to master (#1783)
* Remove stale rule from Makefile (#1782)
* feat: upgrade drone docker image to support multi-stage build. (#1732)
- * Realy don't cache apk index (#1694)
+ * Really don't cache apk index (#1694)
* Limit clone depth when drone-building (#1644)
* Refactor Dockerfile (#1632)
* Check if missing/modified/unused deps in vendor and fix errors (#1468)
@@ -8331,7 +8331,7 @@ WARNING: v1.10.5 is incorrectly tagged targeting 1.12-dev and should __not__ be
* Remove unused files (#2124)
* Improve org error handling (#2117)
* Absolute path for setting.CustomConf (#2085)
- * remove deprecated code for Gogs compitable (#2041)
+ * remove deprecated code for Gogs compatible (#2041)
* Refactor session close as xorm already does everything needed internally (#2020)
* SQLite has a query timeout. Hopefully fixes most 'database locked' errors (#1961)
* Use monospace font in githook editor (#1958)
@@ -8339,7 +8339,7 @@ WARNING: v1.10.5 is incorrectly tagged targeting 1.12-dev and should __not__ be
* Gracefully handle bare repositories on API operations. (#1932)
* Fix errors caused by force push (#1927)
* Display URLs in integration test logs (#1924)
- * Set TMPDIR enviroment variable for dump command (#1915)
+ * Set TMPDIR environment variable for dump command (#1915)
* Cache ctx.User in retrieveFeeds (#1902)
* Make `LocalCopyPath` a setting instead of a hard-coded path (#1881)
* Add check misspelling (#1877)
@@ -8348,7 +8348,7 @@ WARNING: v1.10.5 is incorrectly tagged targeting 1.12-dev and should __not__ be
* Rename misnamed migration (#1867)
* Support CRLF when splitting code lines for display (#1862)
* Add convert less css file step. (#1861)
- * Prevent accidential selection of line numbers in code view (#1860)
+ * Prevent accidental selection of line numbers in code view (#1860)
* Delete Public SSH Key tmp file after calculating fingerprint (#1855)
* Remove annoying difference in button heights. (#1853)
* Only run test coverage on master branch. (#1838)
@@ -8358,7 +8358,7 @@ WARNING: v1.10.5 is incorrectly tagged targeting 1.12-dev and should __not__ be
* Rename RepoCreationNum -> MaxCreationLimit (#1766)
* Add button to admin ui (#1738)
* Correct spelling mistakes (#1703)
- * Make openid support default false for compitable with v1.1 (#1650)
+ * Make openid support default false for compatible with v1.1 (#1650)
* Send mails as HTML as default. Setting for send as plain text. (#1648)
* fix potential lock when sqlite (#1647)
* Optimize png images via Google zopflipng [ci skip] (#1639)
diff --git a/Makefile b/Makefile
index 1bb79e0337..2a78c907c0 100644
--- a/Makefile
+++ b/Makefile
@@ -143,9 +143,9 @@ TAR_EXCLUDES := .git data indexers queues log node_modules $(EXECUTABLE) $(FOMAN
GO_DIRS := build cmd models modules routers services tests
WEB_DIRS := web_src/js web_src/css
-ESLINT_FILES := web_src/js tools *.config.js tests/e2e
+ESLINT_FILES := web_src/js tools *.js tests/e2e
STYLELINT_FILES := web_src/css web_src/js/components/*.vue
-SPELLCHECK_FILES := $(GO_DIRS) $(WEB_DIRS) docs/content templates options/locale/locale_en-US.ini .github
+SPELLCHECK_FILES := $(GO_DIRS) $(WEB_DIRS) docs/content templates options/locale/locale_en-US.ini .github $(filter-out CHANGELOG.md, $(wildcard *.go *.js *.md *.yml *.yaml *.toml))
EDITORCONFIG_FILES := templates .github/workflows options/locale/locale_en-US.ini
GO_SOURCES := $(wildcard *.go)
From dd8e6ae270b4b5e91a152a145978029dacb938ff Mon Sep 17 00:00:00 2001
From: silverwind
Date: Thu, 18 Apr 2024 21:31:53 +0200
Subject: [PATCH 056/556] Improve "Reference in new issue" modal (#30547)
Fixes: https://github.com/go-gitea/gitea/issues/29994
Also some misc enhancements done to the form in the modal.
---
.../view_content/reference_issue_dialog.tmpl | 34 +++++++++----------
web_src/css/base.css | 7 ++++
2 files changed, 23 insertions(+), 18 deletions(-)
diff --git a/templates/repo/issue/view_content/reference_issue_dialog.tmpl b/templates/repo/issue/view_content/reference_issue_dialog.tmpl
index 5f338f6768..f6ac4192ab 100644
--- a/templates/repo/issue/view_content/reference_issue_dialog.tmpl
+++ b/templates/repo/issue/view_content/reference_issue_dialog.tmpl
@@ -5,26 +5,24 @@
@@ -93,9 +93,9 @@
{{if $isHomepage}}
{{/* only show the "code search" on the repo home page, it only does global search,
so do not show it when viewing file or directory to avoid misleading users (it doesn't search in a directory) */}}
-
-
-
+
+
+
{{template "shared/search/button"}}
@@ -113,7 +113,7 @@
{{end}}
-
+
{{if $isHomepage}}
diff --git a/web_src/css/modules/input.css b/web_src/css/modules/input.css
index 18b785ac82..d39377b4e1 100644
--- a/web_src/css/modules/input.css
+++ b/web_src/css/modules/input.css
@@ -188,8 +188,8 @@
.ui.action.input:not([class*="left action"]) > input:focus + .ui.dropdown.selection:hover,
.ui.action.input:not([class*="left action"]) > input:focus + .button,
.ui.action.input:not([class*="left action"]) > input:focus + .button:hover,
-.ui.action.input:not([class*="left action"]) > input:focus + .icon + .button,
-.ui.action.input:not([class*="left action"]) > input:focus + .icon + .button:hover {
+.ui.action.input:not([class*="left action"]) > input:focus + i.icon + .button,
+.ui.action.input:not([class*="left action"]) > input:focus + i.icon + .button:hover {
border-left-color: var(--color-primary);
}
.ui.action.input:not([class*="left action"]) > input:focus {
diff --git a/web_src/css/repo.css b/web_src/css/repo.css
index a930e130f8..408b62ad3c 100644
--- a/web_src/css/repo.css
+++ b/web_src/css/repo.css
@@ -128,15 +128,22 @@
margin-bottom: 12px;
}
-.repository .clone-panel #repo-clone-url {
- width: 320px;
- border-radius: 0;
+.repository .clone-panel {
+ display: flex;
+ flex: 1;
}
-@media (max-width: 991.98px) {
- .repository .clone-panel #repo-clone-url {
- width: 200px;
- }
+.repository.wiki .clone-panel {
+ flex: 0;
+}
+
+.repository.wiki .clone-panel input {
+ width: 20ch;
+}
+
+.repository .clone-panel #repo-clone-url {
+ border-radius: 0;
+ flex: 1;
}
.repository .ui.action.input.clone-panel > button + button,
@@ -2229,17 +2236,37 @@ td .commit-summary {
}
.repo-button-row {
- margin: 10px 0;
+ margin: 8px 0;
display: flex;
align-items: center;
- gap: 0.5em;
- flex-wrap: wrap;
+ gap: 8px;
justify-content: space-between;
}
+.repo-button-row-left,
+.repo-button-row-right {
+ display: flex;
+ flex: 1;
+ align-items: center;
+ gap: 0.5rem;
+}
+
+.repo-button-row-right {
+ justify-content: flex-end;
+}
+
+@media (max-width: 991px) {
+ .repository:not(.wiki) .repo-button-row {
+ flex-direction: column;
+ align-items: stretch;
+ }
+}
+
.repo-button-row .button {
padding: 6px 10px !important;
height: 30px;
+ flex-shrink: 0;
+ margin: 0;
}
.repo-button-row .button.dropdown:not(.icon) {
@@ -2250,6 +2277,12 @@ td .commit-summary {
height: 30px;
}
+@media (max-width: 600px) {
+ .repo-button-row-left {
+ flex-wrap: wrap;
+ }
+}
+
tbody.commit-list {
vertical-align: baseline;
}
From b30b7df9f4b4e1ae7ec55750bca7577bf88abd0b Mon Sep 17 00:00:00 2001
From: silverwind
Date: Fri, 3 May 2024 03:48:24 +0200
Subject: [PATCH 171/556] Fix body margin shifting with modals, fix error on
project column edit (#30831)
Fixes: https://github.com/go-gitea/gitea/issues/30816, regression from
https://github.com/go-gitea/gitea/pull/30723.
Fixes: https://github.com/go-gitea/gitea/pull/30815, regression from
https://github.com/go-gitea/gitea/pull/30723.
Fomantic [expects a
callback](https://github.com/fomantic/Fomantic-UI/blob/59d9b409879ad9413ea0a3efa4ab2e51017ad9b9/src/definitions/modules/modal.js#L530-L534)
to be called during `hide` which we did not do, so it could never remove
the margin it added to `body`.
I do observe the body content shifting to right by 1px when modal opens,
but this is a bug that existed on v1.21 as well, so not a regression.
---------
Co-authored-by: wxiaoguang
---
web_src/js/modules/fomantic/dimmer.js | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/web_src/js/modules/fomantic/dimmer.js b/web_src/js/modules/fomantic/dimmer.js
index f434e1ca59..e027838d4a 100644
--- a/web_src/js/modules/fomantic/dimmer.js
+++ b/web_src/js/modules/fomantic/dimmer.js
@@ -3,11 +3,12 @@ import {queryElemChildren} from '../../utils/dom.js';
export function initFomanticDimmer() {
// stand-in for removed dimmer module
- $.fn.dimmer = function (arg0, $el) {
+ $.fn.dimmer = function (arg0, arg1) {
if (arg0 === 'add content') {
+ const $el = arg1;
const existingDimmer = document.querySelector('body > .ui.dimmer');
if (existingDimmer) {
- queryElemChildren(existingDimmer, '*', (el) => el.remove());
+ queryElemChildren(existingDimmer, '*', (el) => el.classList.add('hidden'));
this._dimmer = existingDimmer;
} else {
this._dimmer = document.createElement('div');
@@ -21,8 +22,10 @@ export function initFomanticDimmer() {
this._dimmer.classList.add('active');
document.body.classList.add('tw-overflow-hidden');
} else if (arg0 === 'hide') {
+ const cb = arg1;
this._dimmer.classList.remove('active');
document.body.classList.remove('tw-overflow-hidden');
+ cb();
}
return this;
};
From c4e875402bd8e787c21bbd4ea07cbb69a8ceef27 Mon Sep 17 00:00:00 2001
From: silverwind
Date: Fri, 3 May 2024 04:12:10 +0200
Subject: [PATCH 172/556] Fix JS error on pull request page (#30838)
Fix this error seen on PR page, regression from
https://github.com/go-gitea/gitea/pull/30803:
Co-authored-by: wxiaoguang
---
web_src/js/features/repo-legacy.js | 1 +
1 file changed, 1 insertion(+)
diff --git a/web_src/js/features/repo-legacy.js b/web_src/js/features/repo-legacy.js
index 670e60def0..b65938b045 100644
--- a/web_src/js/features/repo-legacy.js
+++ b/web_src/js/features/repo-legacy.js
@@ -57,6 +57,7 @@ export function initRepoCommentForm() {
function initBranchSelector() {
const elSelectBranch = document.querySelector('.ui.dropdown.select-branch');
+ if (!elSelectBranch) return;
const isForNewIssue = elSelectBranch.getAttribute('data-for-new-issue') === 'true';
const $selectBranch = $(elSelectBranch);
From 53b55223d167c3fc996dd0278a656f421408ace7 Mon Sep 17 00:00:00 2001
From: wxiaoguang
Date: Fri, 3 May 2024 10:39:36 +0800
Subject: [PATCH 173/556] Ignore useless error message "broken pipe" (#30801)
Fix #30792
---
routers/api/packages/maven/maven.go | 4 +---
services/context/base.go | 4 +---
services/context/context_response.go | 3 ++-
3 files changed, 4 insertions(+), 7 deletions(-)
diff --git a/routers/api/packages/maven/maven.go b/routers/api/packages/maven/maven.go
index 27f0578db7..cb15eae682 100644
--- a/routers/api/packages/maven/maven.go
+++ b/routers/api/packages/maven/maven.go
@@ -140,9 +140,7 @@ func serveMavenMetadata(ctx *context.Context, params parameters) {
ctx.Resp.Header().Set("Content-Length", strconv.Itoa(len(xmlMetadataWithHeader)))
ctx.Resp.Header().Set("Content-Type", contentTypeXML)
- if _, err := ctx.Resp.Write(xmlMetadataWithHeader); err != nil {
- log.Error("write bytes failed: %v", err)
- }
+ _, _ = ctx.Resp.Write(xmlMetadataWithHeader)
}
func servePackageFile(ctx *context.Context, params parameters, serveContent bool) {
diff --git a/services/context/base.go b/services/context/base.go
index 62fb743714..05b8ab1b9b 100644
--- a/services/context/base.go
+++ b/services/context/base.go
@@ -234,9 +234,7 @@ func (b *Base) plainTextInternal(skip, status int, bs []byte) {
b.Resp.Header().Set("Content-Type", "text/plain;charset=utf-8")
b.Resp.Header().Set("X-Content-Type-Options", "nosniff")
b.Resp.WriteHeader(status)
- if _, err := b.Resp.Write(bs); err != nil {
- log.ErrorWithSkip(skip, "plainTextInternal (status=%d): write bytes failed: %v", status, err)
- }
+ _, _ = b.Resp.Write(bs)
}
// PlainTextBytes renders bytes as plain text
diff --git a/services/context/context_response.go b/services/context/context_response.go
index d7fd18acac..87c34c35ed 100644
--- a/services/context/context_response.go
+++ b/services/context/context_response.go
@@ -13,6 +13,7 @@ import (
"path"
"strconv"
"strings"
+ "syscall"
"time"
user_model "code.gitea.io/gitea/models/user"
@@ -77,7 +78,7 @@ func (ctx *Context) HTML(status int, name base.TplName) {
}
err := ctx.Render.HTML(ctx.Resp, status, string(name), ctx.Data, ctx.TemplateContext)
- if err == nil {
+ if err == nil || errors.Is(err, syscall.EPIPE) {
return
}
From a50026e2f30897904704895362da0fb12c7e5b26 Mon Sep 17 00:00:00 2001
From: yp05327 <576951401@qq.com>
Date: Fri, 3 May 2024 15:11:51 +0900
Subject: [PATCH 174/556] Fix no edit history after editing issue's title and
content (#30814)
Fix #30807
reuse functions in services
---
models/issues/issue_update.go | 56 -----------------------------
modules/structs/pull.go | 2 +-
routers/api/v1/repo/issue.go | 36 +++++++++----------
routers/api/v1/repo/pull.go | 37 +++++++++----------
tests/integration/api_issue_test.go | 4 +++
tests/integration/api_pull_test.go | 26 +++++++++-----
6 files changed, 56 insertions(+), 105 deletions(-)
diff --git a/models/issues/issue_update.go b/models/issues/issue_update.go
index ef96e1ee50..147b7eb3b9 100644
--- a/models/issues/issue_update.go
+++ b/models/issues/issue_update.go
@@ -429,62 +429,6 @@ func UpdateIssueMentions(ctx context.Context, issueID int64, mentions []*user_mo
return nil
}
-// UpdateIssueByAPI updates all allowed fields of given issue.
-// If the issue status is changed a statusChangeComment is returned
-// similarly if the title is changed the titleChanged bool is set to true
-func UpdateIssueByAPI(ctx context.Context, issue *Issue, doer *user_model.User) (statusChangeComment *Comment, titleChanged bool, err error) {
- ctx, committer, err := db.TxContext(ctx)
- if err != nil {
- return nil, false, err
- }
- defer committer.Close()
-
- if err := issue.LoadRepo(ctx); err != nil {
- return nil, false, fmt.Errorf("loadRepo: %w", err)
- }
-
- // Reload the issue
- currentIssue, err := GetIssueByID(ctx, issue.ID)
- if err != nil {
- return nil, false, err
- }
-
- if _, err := db.GetEngine(ctx).ID(issue.ID).Cols(
- "name", "content", "milestone_id", "priority",
- "deadline_unix", "updated_unix", "is_locked").
- Update(issue); err != nil {
- return nil, false, err
- }
-
- titleChanged = currentIssue.Title != issue.Title
- if titleChanged {
- opts := &CreateCommentOptions{
- Type: CommentTypeChangeTitle,
- Doer: doer,
- Repo: issue.Repo,
- Issue: issue,
- OldTitle: currentIssue.Title,
- NewTitle: issue.Title,
- }
- _, err := CreateComment(ctx, opts)
- if err != nil {
- return nil, false, fmt.Errorf("createComment: %w", err)
- }
- }
-
- if currentIssue.IsClosed != issue.IsClosed {
- statusChangeComment, err = doChangeIssueStatus(ctx, issue, doer, false)
- if err != nil {
- return nil, false, err
- }
- }
-
- if err := issue.AddCrossReferences(ctx, doer, true); err != nil {
- return nil, false, err
- }
- return statusChangeComment, titleChanged, committer.Commit()
-}
-
// UpdateIssueDeadline updates an issue deadline and adds comments. Setting a deadline to 0 means deleting it.
func UpdateIssueDeadline(ctx context.Context, issue *Issue, deadlineUnix timeutil.TimeStamp, doer *user_model.User) (err error) {
// if the deadline hasn't changed do nothing
diff --git a/modules/structs/pull.go b/modules/structs/pull.go
index 05a8d59633..b04def52b8 100644
--- a/modules/structs/pull.go
+++ b/modules/structs/pull.go
@@ -85,7 +85,7 @@ type CreatePullRequestOption struct {
// EditPullRequestOption options when modify pull request
type EditPullRequestOption struct {
Title string `json:"title"`
- Body string `json:"body"`
+ Body *string `json:"body"`
Base string `json:"base"`
Assignee string `json:"assignee"`
Assignees []string `json:"assignees"`
diff --git a/routers/api/v1/repo/issue.go b/routers/api/v1/repo/issue.go
index dfe6d31f74..b91fbc33bf 100644
--- a/routers/api/v1/repo/issue.go
+++ b/routers/api/v1/repo/issue.go
@@ -29,7 +29,6 @@ import (
"code.gitea.io/gitea/services/context"
"code.gitea.io/gitea/services/convert"
issue_service "code.gitea.io/gitea/services/issue"
- notify_service "code.gitea.io/gitea/services/notify"
)
// SearchIssues searches for issues across the repositories that the user has access to
@@ -803,12 +802,19 @@ func EditIssue(ctx *context.APIContext) {
return
}
- oldTitle := issue.Title
if len(form.Title) > 0 {
- issue.Title = form.Title
+ err = issue_service.ChangeTitle(ctx, issue, ctx.Doer, form.Title)
+ if err != nil {
+ ctx.Error(http.StatusInternalServerError, "ChangeTitle", err)
+ return
+ }
}
if form.Body != nil {
- issue.Content = *form.Body
+ err = issue_service.ChangeContent(ctx, issue, ctx.Doer, *form.Body)
+ if err != nil {
+ ctx.Error(http.StatusInternalServerError, "ChangeContent", err)
+ return
+ }
}
if form.Ref != nil {
err = issue_service.ChangeIssueRef(ctx, issue, ctx.Doer, *form.Ref)
@@ -880,24 +886,14 @@ func EditIssue(ctx *context.APIContext) {
return
}
}
- issue.IsClosed = api.StateClosed == api.StateType(*form.State)
- }
- statusChangeComment, titleChanged, err := issues_model.UpdateIssueByAPI(ctx, issue, ctx.Doer)
- if err != nil {
- if issues_model.IsErrDependenciesLeft(err) {
- ctx.Error(http.StatusPreconditionFailed, "DependenciesLeft", "cannot close this issue because it still has open dependencies")
+ if err := issue_service.ChangeStatus(ctx, issue, ctx.Doer, "", api.StateClosed == api.StateType(*form.State)); err != nil {
+ if issues_model.IsErrDependenciesLeft(err) {
+ ctx.Error(http.StatusPreconditionFailed, "DependenciesLeft", "cannot close this issue because it still has open dependencies")
+ return
+ }
+ ctx.Error(http.StatusInternalServerError, "ChangeStatus", err)
return
}
- ctx.Error(http.StatusInternalServerError, "UpdateIssueByAPI", err)
- return
- }
-
- if titleChanged {
- notify_service.IssueChangeTitle(ctx, ctx.Doer, issue, oldTitle)
- }
-
- if statusChangeComment != nil {
- notify_service.IssueChangeStatus(ctx, ctx.Doer, "", issue, statusChangeComment, issue.IsClosed)
}
// Refetch from database to assign some automatic values
diff --git a/routers/api/v1/repo/pull.go b/routers/api/v1/repo/pull.go
index 4129f94ac3..8bd4ddf64b 100644
--- a/routers/api/v1/repo/pull.go
+++ b/routers/api/v1/repo/pull.go
@@ -602,12 +602,19 @@ func EditPullRequest(ctx *context.APIContext) {
return
}
- oldTitle := issue.Title
if len(form.Title) > 0 {
- issue.Title = form.Title
+ err = issue_service.ChangeTitle(ctx, issue, ctx.Doer, form.Title)
+ if err != nil {
+ ctx.Error(http.StatusInternalServerError, "ChangeTitle", err)
+ return
+ }
}
- if len(form.Body) > 0 {
- issue.Content = form.Body
+ if form.Body != nil {
+ err = issue_service.ChangeContent(ctx, issue, ctx.Doer, *form.Body)
+ if err != nil {
+ ctx.Error(http.StatusInternalServerError, "ChangeContent", err)
+ return
+ }
}
// Update or remove deadline if set
@@ -686,24 +693,14 @@ func EditPullRequest(ctx *context.APIContext) {
ctx.Error(http.StatusPreconditionFailed, "MergedPRState", "cannot change state of this pull request, it was already merged")
return
}
- issue.IsClosed = api.StateClosed == api.StateType(*form.State)
- }
- statusChangeComment, titleChanged, err := issues_model.UpdateIssueByAPI(ctx, issue, ctx.Doer)
- if err != nil {
- if issues_model.IsErrDependenciesLeft(err) {
- ctx.Error(http.StatusPreconditionFailed, "DependenciesLeft", "cannot close this pull request because it still has open dependencies")
+ if err := issue_service.ChangeStatus(ctx, issue, ctx.Doer, "", api.StateClosed == api.StateType(*form.State)); err != nil {
+ if issues_model.IsErrDependenciesLeft(err) {
+ ctx.Error(http.StatusPreconditionFailed, "DependenciesLeft", "cannot close this pull request because it still has open dependencies")
+ return
+ }
+ ctx.Error(http.StatusInternalServerError, "ChangeStatus", err)
return
}
- ctx.Error(http.StatusInternalServerError, "UpdateIssueByAPI", err)
- return
- }
-
- if titleChanged {
- notify_service.IssueChangeTitle(ctx, ctx.Doer, issue, oldTitle)
- }
-
- if statusChangeComment != nil {
- notify_service.IssueChangeStatus(ctx, ctx.Doer, "", issue, statusChangeComment, issue.IsClosed)
}
// change pull target branch
diff --git a/tests/integration/api_issue_test.go b/tests/integration/api_issue_test.go
index 17b4e5bd71..8bfb6fabe2 100644
--- a/tests/integration/api_issue_test.go
+++ b/tests/integration/api_issue_test.go
@@ -194,6 +194,10 @@ func TestAPIEditIssue(t *testing.T) {
issueAfter := unittest.AssertExistsAndLoadBean(t, &issues_model.Issue{ID: 10})
repoAfter := unittest.AssertExistsAndLoadBean(t, &repo_model.Repository{ID: issueBefore.RepoID})
+ // check comment history
+ unittest.AssertExistsAndLoadBean(t, &issues_model.Comment{IssueID: issueAfter.ID, OldTitle: issueBefore.Title, NewTitle: title})
+ unittest.AssertExistsAndLoadBean(t, &issues_model.ContentHistory{IssueID: issueAfter.ID, ContentText: body, IsFirstCreated: false})
+
// check deleted user
assert.Equal(t, int64(500), issueAfter.PosterID)
assert.NoError(t, issueAfter.LoadAttributes(db.DefaultContext))
diff --git a/tests/integration/api_pull_test.go b/tests/integration/api_pull_test.go
index bb479caf89..9bf0d3d745 100644
--- a/tests/integration/api_pull_test.go
+++ b/tests/integration/api_pull_test.go
@@ -223,23 +223,33 @@ func TestAPIEditPull(t *testing.T) {
session := loginUser(t, owner10.Name)
token := getTokenForLoggedInUser(t, session, auth_model.AccessTokenScopeWriteRepository)
+ title := "create a success pr"
req := NewRequestWithJSON(t, http.MethodPost, fmt.Sprintf("/api/v1/repos/%s/%s/pulls", owner10.Name, repo10.Name), &api.CreatePullRequestOption{
Head: "develop",
Base: "master",
- Title: "create a success pr",
+ Title: title,
}).AddTokenAuth(token)
- pull := new(api.PullRequest)
+ apiPull := new(api.PullRequest)
resp := MakeRequest(t, req, http.StatusCreated)
- DecodeJSON(t, resp, pull)
- assert.EqualValues(t, "master", pull.Base.Name)
+ DecodeJSON(t, resp, apiPull)
+ assert.EqualValues(t, "master", apiPull.Base.Name)
- req = NewRequestWithJSON(t, http.MethodPatch, fmt.Sprintf("/api/v1/repos/%s/%s/pulls/%d", owner10.Name, repo10.Name, pull.Index), &api.EditPullRequestOption{
+ newTitle := "edit a this pr"
+ newBody := "edited body"
+ req = NewRequestWithJSON(t, http.MethodPatch, fmt.Sprintf("/api/v1/repos/%s/%s/pulls/%d", owner10.Name, repo10.Name, apiPull.Index), &api.EditPullRequestOption{
Base: "feature/1",
- Title: "edit a this pr",
+ Title: newTitle,
+ Body: &newBody,
}).AddTokenAuth(token)
resp = MakeRequest(t, req, http.StatusCreated)
- DecodeJSON(t, resp, pull)
- assert.EqualValues(t, "feature/1", pull.Base.Name)
+ DecodeJSON(t, resp, apiPull)
+ assert.EqualValues(t, "feature/1", apiPull.Base.Name)
+ // check comment history
+ pull := unittest.AssertExistsAndLoadBean(t, &issues_model.PullRequest{ID: apiPull.ID})
+ err := pull.LoadIssue(db.DefaultContext)
+ assert.NoError(t, err)
+ unittest.AssertExistsAndLoadBean(t, &issues_model.Comment{IssueID: pull.Issue.ID, OldTitle: title, NewTitle: newTitle})
+ unittest.AssertExistsAndLoadBean(t, &issues_model.ContentHistory{IssueID: pull.Issue.ID, ContentText: newBody, IsFirstCreated: false})
req = NewRequestWithJSON(t, http.MethodPatch, fmt.Sprintf("/api/v1/repos/%s/%s/pulls/%d", owner10.Name, repo10.Name, pull.Index), &api.EditPullRequestOption{
Base: "not-exist",
From 9f0ef3621a3b63ccbe93f302a446b67dc54ad725 Mon Sep 17 00:00:00 2001
From: Kemal Zebari <60799661+kemzeb@users.noreply.github.com>
Date: Fri, 3 May 2024 00:58:31 -0700
Subject: [PATCH 175/556] Don't only list code-enabled repositories when using
repository API (#30817)
We should be listing all repositories by default.
Fixes #28483.
---
routers/api/v1/user/repo.go | 4 +---
tests/integration/api_repo_test.go | 34 ++++++++++++++++++++++++++++++
2 files changed, 35 insertions(+), 3 deletions(-)
diff --git a/routers/api/v1/user/repo.go b/routers/api/v1/user/repo.go
index 81f8e0f3fe..d0264d6b5a 100644
--- a/routers/api/v1/user/repo.go
+++ b/routers/api/v1/user/repo.go
@@ -6,10 +6,8 @@ package user
import (
"net/http"
- "code.gitea.io/gitea/models/perm"
access_model "code.gitea.io/gitea/models/perm/access"
repo_model "code.gitea.io/gitea/models/repo"
- unit_model "code.gitea.io/gitea/models/unit"
user_model "code.gitea.io/gitea/models/user"
api "code.gitea.io/gitea/modules/structs"
"code.gitea.io/gitea/routers/api/v1/utils"
@@ -44,7 +42,7 @@ func listUserRepos(ctx *context.APIContext, u *user_model.User, private bool) {
ctx.Error(http.StatusInternalServerError, "GetUserRepoPermission", err)
return
}
- if ctx.IsSigned && ctx.Doer.IsAdmin || permission.UnitAccessMode(unit_model.TypeCode) >= perm.AccessModeRead {
+ if ctx.IsSigned && ctx.Doer.IsAdmin || permission.HasAnyUnitAccess() {
apiRepos = append(apiRepos, convert.ToRepo(ctx, repos[i], permission))
}
}
diff --git a/tests/integration/api_repo_test.go b/tests/integration/api_repo_test.go
index f33827e58b..716da762e5 100644
--- a/tests/integration/api_repo_test.go
+++ b/tests/integration/api_repo_test.go
@@ -13,6 +13,7 @@ import (
"code.gitea.io/gitea/models/db"
access_model "code.gitea.io/gitea/models/perm/access"
repo_model "code.gitea.io/gitea/models/repo"
+ unit_model "code.gitea.io/gitea/models/unit"
"code.gitea.io/gitea/models/unittest"
user_model "code.gitea.io/gitea/models/user"
"code.gitea.io/gitea/modules/setting"
@@ -326,6 +327,39 @@ func TestAPIOrgRepos(t *testing.T) {
}
}
+// See issue #28483. Tests to make sure we consider more than just code unit-enabled repositories.
+func TestAPIOrgReposWithCodeUnitDisabled(t *testing.T) {
+ defer tests.PrepareTestEnv(t)()
+ repo21 := unittest.AssertExistsAndLoadBean(t, &repo_model.Repository{Name: "repo21"})
+ org3 := unittest.AssertExistsAndLoadBean(t, &user_model.User{ID: repo21.OwnerID})
+
+ // Disable code repository unit.
+ var units []unit_model.Type
+ units = append(units, unit_model.TypeCode)
+
+ if err := repo_service.UpdateRepositoryUnits(db.DefaultContext, repo21, nil, units); err != nil {
+ assert.Fail(t, "should have been able to delete code repository unit; failed to %v", err)
+ }
+ assert.False(t, repo21.UnitEnabled(db.DefaultContext, unit_model.TypeCode))
+
+ session := loginUser(t, "user2")
+ token := getTokenForLoggedInUser(t, session, auth_model.AccessTokenScopeReadOrganization)
+
+ req := NewRequestf(t, "GET", "/api/v1/orgs/%s/repos", org3.Name).
+ AddTokenAuth(token)
+
+ resp := MakeRequest(t, req, http.StatusOK)
+ var apiRepos []*api.Repository
+ DecodeJSON(t, resp, &apiRepos)
+
+ var repoNames []string
+ for _, r := range apiRepos {
+ repoNames = append(repoNames, r.Name)
+ }
+
+ assert.Contains(t, repoNames, repo21.Name)
+}
+
func TestAPIGetRepoByIDUnauthorized(t *testing.T) {
defer tests.PrepareTestEnv(t)()
user := unittest.AssertExistsAndLoadBean(t, &user_model.User{ID: 4})
From 0f3e717a1abb2b2161b87dac557beb6475224a2e Mon Sep 17 00:00:00 2001
From: wxiaoguang
Date: Fri, 3 May 2024 17:13:48 +0800
Subject: [PATCH 176/556] Improve grep search (#30843)
Reduce the context line number to 1, make "git grep" search respect the
include/exclude patter, and fix #30785
---
modules/git/grep.go | 2 ++
modules/git/grep_test.go | 20 ++++++++++++++++++++
modules/setting/glob.go | 32 ++++++++++++++++++++++++++++++++
modules/setting/indexer.go | 12 +++++-------
routers/web/repo/search.go | 18 +++++++++++++++++-
routers/web/repo/search_test.go | 19 +++++++++++++++++++
6 files changed, 95 insertions(+), 8 deletions(-)
create mode 100644 modules/setting/glob.go
create mode 100644 routers/web/repo/search_test.go
diff --git a/modules/git/grep.go b/modules/git/grep.go
index e7d238e586..bf6b41a886 100644
--- a/modules/git/grep.go
+++ b/modules/git/grep.go
@@ -29,6 +29,7 @@ type GrepOptions struct {
ContextLineNumber int
IsFuzzy bool
MaxLineLength int // the maximum length of a line to parse, exceeding chars will be truncated
+ PathspecList []string
}
func GrepSearch(ctx context.Context, repo *Repository, search string, opts GrepOptions) ([]*GrepResult, error) {
@@ -62,6 +63,7 @@ func GrepSearch(ctx context.Context, repo *Repository, search string, opts GrepO
cmd.AddOptionValues("-e", strings.TrimLeft(search, "-"))
}
cmd.AddDynamicArguments(util.IfZero(opts.RefName, "HEAD"))
+ cmd.AddDashesAndList(opts.PathspecList...)
opts.MaxResultLimit = util.IfZero(opts.MaxResultLimit, 50)
stderr := bytes.Buffer{}
err = cmd.Run(&RunOpts{
diff --git a/modules/git/grep_test.go b/modules/git/grep_test.go
index 7f4ded478f..6a99f80407 100644
--- a/modules/git/grep_test.go
+++ b/modules/git/grep_test.go
@@ -31,6 +31,26 @@ func TestGrepSearch(t *testing.T) {
},
}, res)
+ res, err = GrepSearch(context.Background(), repo, "void", GrepOptions{PathspecList: []string{":(glob)java-hello/*"}})
+ assert.NoError(t, err)
+ assert.Equal(t, []*GrepResult{
+ {
+ Filename: "java-hello/main.java",
+ LineNumbers: []int{3},
+ LineCodes: []string{" public static void main(String[] args)"},
+ },
+ }, res)
+
+ res, err = GrepSearch(context.Background(), repo, "void", GrepOptions{PathspecList: []string{":(glob,exclude)java-hello/*"}})
+ assert.NoError(t, err)
+ assert.Equal(t, []*GrepResult{
+ {
+ Filename: "main.vendor.java",
+ LineNumbers: []int{3},
+ LineCodes: []string{" public static void main(String[] args)"},
+ },
+ }, res)
+
res, err = GrepSearch(context.Background(), repo, "void", GrepOptions{MaxResultLimit: 1})
assert.NoError(t, err)
assert.Equal(t, []*GrepResult{
diff --git a/modules/setting/glob.go b/modules/setting/glob.go
new file mode 100644
index 0000000000..8f1d24dea4
--- /dev/null
+++ b/modules/setting/glob.go
@@ -0,0 +1,32 @@
+// Copyright 2024 The Gitea Authors. All rights reserved.
+// SPDX-License-Identifier: MIT
+
+package setting
+
+import "github.com/gobwas/glob"
+
+type GlobMatcher struct {
+ compiledGlob glob.Glob
+ patternString string
+}
+
+var _ glob.Glob = (*GlobMatcher)(nil)
+
+func (g *GlobMatcher) Match(s string) bool {
+ return g.compiledGlob.Match(s)
+}
+
+func (g *GlobMatcher) PatternString() string {
+ return g.patternString
+}
+
+func GlobMatcherCompile(pattern string, separators ...rune) (*GlobMatcher, error) {
+ g, err := glob.Compile(pattern, separators...)
+ if err != nil {
+ return nil, err
+ }
+ return &GlobMatcher{
+ compiledGlob: g,
+ patternString: pattern,
+ }, nil
+}
diff --git a/modules/setting/indexer.go b/modules/setting/indexer.go
index 6877d70e3c..18585602c3 100644
--- a/modules/setting/indexer.go
+++ b/modules/setting/indexer.go
@@ -10,8 +10,6 @@ import (
"time"
"code.gitea.io/gitea/modules/log"
-
- "github.com/gobwas/glob"
)
// Indexer settings
@@ -30,8 +28,8 @@ var Indexer = struct {
RepoConnStr string
RepoIndexerName string
MaxIndexerFileSize int64
- IncludePatterns []glob.Glob
- ExcludePatterns []glob.Glob
+ IncludePatterns []*GlobMatcher
+ ExcludePatterns []*GlobMatcher
ExcludeVendored bool
}{
IssueType: "bleve",
@@ -93,12 +91,12 @@ func loadIndexerFrom(rootCfg ConfigProvider) {
}
// IndexerGlobFromString parses a comma separated list of patterns and returns a glob.Glob slice suited for repo indexing
-func IndexerGlobFromString(globstr string) []glob.Glob {
- extarr := make([]glob.Glob, 0, 10)
+func IndexerGlobFromString(globstr string) []*GlobMatcher {
+ extarr := make([]*GlobMatcher, 0, 10)
for _, expr := range strings.Split(strings.ToLower(globstr), ",") {
expr = strings.TrimSpace(expr)
if expr != "" {
- if g, err := glob.Compile(expr, '.', '/'); err != nil {
+ if g, err := GlobMatcherCompile(expr, '.', '/'); err != nil {
log.Info("Invalid glob expression '%s' (skipped): %v", expr, err)
} else {
extarr = append(extarr, g)
diff --git a/routers/web/repo/search.go b/routers/web/repo/search.go
index d7854b2499..920a865555 100644
--- a/routers/web/repo/search.go
+++ b/routers/web/repo/search.go
@@ -17,6 +17,16 @@ import (
const tplSearch base.TplName = "repo/search"
+func indexSettingToGitGrepPathspecList() (list []string) {
+ for _, expr := range setting.Indexer.IncludePatterns {
+ list = append(list, ":(glob)"+expr.PatternString())
+ }
+ for _, expr := range setting.Indexer.ExcludePatterns {
+ list = append(list, ":(glob,exclude)"+expr.PatternString())
+ }
+ return list
+}
+
// Search render repository search page
func Search(ctx *context.Context) {
language := ctx.FormTrim("l")
@@ -65,8 +75,14 @@ func Search(ctx *context.Context) {
ctx.Data["CodeIndexerUnavailable"] = !code_indexer.IsAvailable(ctx)
}
} else {
- res, err := git.GrepSearch(ctx, ctx.Repo.GitRepo, keyword, git.GrepOptions{ContextLineNumber: 3, IsFuzzy: isFuzzy})
+ res, err := git.GrepSearch(ctx, ctx.Repo.GitRepo, keyword, git.GrepOptions{
+ ContextLineNumber: 1,
+ IsFuzzy: isFuzzy,
+ RefName: git.RefNameFromBranch(ctx.Repo.BranchName).String(), // BranchName should be default branch or the first existing branch
+ PathspecList: indexSettingToGitGrepPathspecList(),
+ })
if err != nil {
+ // TODO: if no branch exists, it reports: exit status 128, fatal: this operation must be run in a work tree.
ctx.ServerError("GrepSearch", err)
return
}
diff --git a/routers/web/repo/search_test.go b/routers/web/repo/search_test.go
new file mode 100644
index 0000000000..33a1610384
--- /dev/null
+++ b/routers/web/repo/search_test.go
@@ -0,0 +1,19 @@
+// Copyright 2024 The Gitea Authors. All rights reserved.
+// SPDX-License-Identifier: MIT
+
+package repo
+
+import (
+ "testing"
+
+ "code.gitea.io/gitea/modules/setting"
+ "code.gitea.io/gitea/modules/test"
+
+ "github.com/stretchr/testify/assert"
+)
+
+func TestIndexSettingToGitGrepPathspecList(t *testing.T) {
+ defer test.MockVariableValue(&setting.Indexer.IncludePatterns, setting.IndexerGlobFromString("a"))()
+ defer test.MockVariableValue(&setting.Indexer.ExcludePatterns, setting.IndexerGlobFromString("b"))()
+ assert.Equal(t, []string{":(glob)a", ":(glob,exclude)b"}, indexSettingToGitGrepPathspecList())
+}
From c7bb3aa03436314e20d43e0ae44e791dd3e64909 Mon Sep 17 00:00:00 2001
From: wxiaoguang
Date: Sat, 4 May 2024 09:48:16 +0800
Subject: [PATCH 177/556] Fix markdown URL parsing for commit ID (#30812)
---
modules/markup/html.go | 122 +++++++++++++++------------
modules/markup/html_codepreview.go | 3 +-
modules/markup/html_internal_test.go | 59 +++++++++----
modules/markup/html_test.go | 7 +-
4 files changed, 116 insertions(+), 75 deletions(-)
diff --git a/modules/markup/html.go b/modules/markup/html.go
index 5ae0cc8755..2958dc9646 100644
--- a/modules/markup/html.go
+++ b/modules/markup/html.go
@@ -10,6 +10,7 @@ import (
"path"
"path/filepath"
"regexp"
+ "slices"
"strings"
"sync"
@@ -54,7 +55,7 @@ var (
shortLinkPattern = regexp.MustCompile(`\[\[(.*?)\]\](\w*)`)
// anyHashPattern splits url containing SHA into parts
- anyHashPattern = regexp.MustCompile(`https?://(?:\S+/){4,5}([0-9a-f]{40,64})(/[-+~_%.a-zA-Z0-9/]+)?(#[-+~_%.a-zA-Z0-9]+)?`)
+ anyHashPattern = regexp.MustCompile(`https?://(?:\S+/){4,5}([0-9a-f]{40,64})(/[-+~%./\w]+)?(\?[-+~%.\w&=]+)?(#[-+~%.\w]+)?`)
// comparePattern matches "http://domain/org/repo/compare/COMMIT1...COMMIT2#hash"
comparePattern = regexp.MustCompile(`https?://(?:\S+/){4,5}([0-9a-f]{7,64})(\.\.\.?)([0-9a-f]{7,64})?(#[-+~_%.a-zA-Z0-9]+)?`)
@@ -591,7 +592,8 @@ func replaceContentList(node *html.Node, i, j int, newNodes []*html.Node) {
func mentionProcessor(ctx *RenderContext, node *html.Node) {
start := 0
- for node != nil {
+ nodeStop := node.NextSibling
+ for node != nodeStop {
found, loc := references.FindFirstMentionBytes(util.UnsafeStringToBytes(node.Data[start:]))
if !found {
node = node.NextSibling
@@ -962,57 +964,68 @@ func commitCrossReferencePatternProcessor(ctx *RenderContext, node *html.Node) {
}
}
+type anyHashPatternResult struct {
+ PosStart int
+ PosEnd int
+ FullURL string
+ CommitID string
+ SubPath string
+ QueryHash string
+}
+
+func anyHashPatternExtract(s string) (ret anyHashPatternResult, ok bool) {
+ m := anyHashPattern.FindStringSubmatchIndex(s)
+ if m == nil {
+ return ret, false
+ }
+
+ ret.PosStart, ret.PosEnd = m[0], m[1]
+ ret.FullURL = s[ret.PosStart:ret.PosEnd]
+ if strings.HasSuffix(ret.FullURL, ".") {
+ // if url ends in '.', it's very likely that it is not part of the actual url but used to finish a sentence.
+ ret.PosEnd--
+ ret.FullURL = ret.FullURL[:len(ret.FullURL)-1]
+ for i := 0; i < len(m); i++ {
+ m[i] = min(m[i], ret.PosEnd)
+ }
+ }
+
+ ret.CommitID = s[m[2]:m[3]]
+ if m[5] > 0 {
+ ret.SubPath = s[m[4]:m[5]]
+ }
+
+ lastStart, lastEnd := m[len(m)-2], m[len(m)-1]
+ if lastEnd > 0 {
+ ret.QueryHash = s[lastStart:lastEnd][1:]
+ }
+ return ret, true
+}
+
// fullHashPatternProcessor renders SHA containing URLs
func fullHashPatternProcessor(ctx *RenderContext, node *html.Node) {
if ctx.Metas == nil {
return
}
-
- next := node.NextSibling
- for node != nil && node != next {
- m := anyHashPattern.FindStringSubmatchIndex(node.Data)
- if m == nil {
- return
+ nodeStop := node.NextSibling
+ for node != nodeStop {
+ if node.Type != html.TextNode {
+ node = node.NextSibling
+ continue
}
-
- urlFull := node.Data[m[0]:m[1]]
- text := base.ShortSha(node.Data[m[2]:m[3]])
-
- // 3rd capture group matches a optional path
- subpath := ""
- if m[5] > 0 {
- subpath = node.Data[m[4]:m[5]]
+ ret, ok := anyHashPatternExtract(node.Data)
+ if !ok {
+ node = node.NextSibling
+ continue
}
-
- // 4th capture group matches a optional url hash
- hash := ""
- if m[7] > 0 {
- hash = node.Data[m[6]:m[7]][1:]
+ text := base.ShortSha(ret.CommitID)
+ if ret.SubPath != "" {
+ text += ret.SubPath
}
-
- start := m[0]
- end := m[1]
-
- // If url ends in '.', it's very likely that it is not part of the
- // actual url but used to finish a sentence.
- if strings.HasSuffix(urlFull, ".") {
- end--
- urlFull = urlFull[:len(urlFull)-1]
- if hash != "" {
- hash = hash[:len(hash)-1]
- } else if subpath != "" {
- subpath = subpath[:len(subpath)-1]
- }
+ if ret.QueryHash != "" {
+ text += " (" + ret.QueryHash + ")"
}
-
- if subpath != "" {
- text += subpath
- }
-
- if hash != "" {
- text += " (" + hash + ")"
- }
- replaceContent(node, start, end, createCodeLink(urlFull, text, "commit"))
+ replaceContent(node, ret.PosStart, ret.PosEnd, createCodeLink(ret.FullURL, text, "commit"))
node = node.NextSibling.NextSibling
}
}
@@ -1021,19 +1034,16 @@ func comparePatternProcessor(ctx *RenderContext, node *html.Node) {
if ctx.Metas == nil {
return
}
-
- next := node.NextSibling
- for node != nil && node != next {
- m := comparePattern.FindStringSubmatchIndex(node.Data)
- if m == nil {
- return
+ nodeStop := node.NextSibling
+ for node != nodeStop {
+ if node.Type != html.TextNode {
+ node = node.NextSibling
+ continue
}
-
- // Ensure that every group (m[0]...m[7]) has a match
- for i := 0; i < 8; i++ {
- if m[i] == -1 {
- return
- }
+ m := comparePattern.FindStringSubmatchIndex(node.Data)
+ if m == nil || slices.Contains(m[:8], -1) { // ensure that every group (m[0]...m[7]) has a match
+ node = node.NextSibling
+ continue
}
urlFull := node.Data[m[0]:m[1]]
diff --git a/modules/markup/html_codepreview.go b/modules/markup/html_codepreview.go
index d9da24ea34..5ef2217e3d 100644
--- a/modules/markup/html_codepreview.go
+++ b/modules/markup/html_codepreview.go
@@ -60,7 +60,8 @@ func renderCodeBlock(ctx *RenderContext, node *html.Node) (urlPosStart, urlPosSt
}
func codePreviewPatternProcessor(ctx *RenderContext, node *html.Node) {
- for node != nil {
+ nodeStop := node.NextSibling
+ for node != nodeStop {
if node.Type != html.TextNode {
node = node.NextSibling
continue
diff --git a/modules/markup/html_internal_test.go b/modules/markup/html_internal_test.go
index e313be7040..3ff0597851 100644
--- a/modules/markup/html_internal_test.go
+++ b/modules/markup/html_internal_test.go
@@ -399,36 +399,61 @@ func TestRegExp_sha1CurrentPattern(t *testing.T) {
}
func TestRegExp_anySHA1Pattern(t *testing.T) {
- testCases := map[string][]string{
+ testCases := map[string]anyHashPatternResult{
"https://github.com/jquery/jquery/blob/a644101ed04d0beacea864ce805e0c4f86ba1cd1/test/unit/event.js#L2703": {
- "a644101ed04d0beacea864ce805e0c4f86ba1cd1",
- "/test/unit/event.js",
- "#L2703",
+ CommitID: "a644101ed04d0beacea864ce805e0c4f86ba1cd1",
+ SubPath: "/test/unit/event.js",
+ QueryHash: "L2703",
},
"https://github.com/jquery/jquery/blob/a644101ed04d0beacea864ce805e0c4f86ba1cd1/test/unit/event.js": {
- "a644101ed04d0beacea864ce805e0c4f86ba1cd1",
- "/test/unit/event.js",
- "",
+ CommitID: "a644101ed04d0beacea864ce805e0c4f86ba1cd1",
+ SubPath: "/test/unit/event.js",
},
"https://github.com/jquery/jquery/commit/0705be475092aede1eddae01319ec931fb9c65fc": {
- "0705be475092aede1eddae01319ec931fb9c65fc",
- "",
- "",
+ CommitID: "0705be475092aede1eddae01319ec931fb9c65fc",
},
"https://github.com/jquery/jquery/tree/0705be475092aede1eddae01319ec931fb9c65fc/src": {
- "0705be475092aede1eddae01319ec931fb9c65fc",
- "/src",
- "",
+ CommitID: "0705be475092aede1eddae01319ec931fb9c65fc",
+ SubPath: "/src",
},
"https://try.gogs.io/gogs/gogs/commit/d8a994ef243349f321568f9e36d5c3f444b99cae#diff-2": {
- "d8a994ef243349f321568f9e36d5c3f444b99cae",
- "",
- "#diff-2",
+ CommitID: "d8a994ef243349f321568f9e36d5c3f444b99cae",
+ QueryHash: "diff-2",
+ },
+ "non-url": {},
+ "http://a/b/c/d/e/1234567812345678123456781234567812345678123456781234567812345678?a=b#L1-L2": {
+ CommitID: "1234567812345678123456781234567812345678123456781234567812345678",
+ QueryHash: "L1-L2",
+ },
+ "http://a/b/c/d/e/1234567812345678123456781234567812345678123456781234567812345678.": {
+ CommitID: "1234567812345678123456781234567812345678123456781234567812345678",
+ },
+ "http://a/b/c/d/e/1234567812345678123456781234567812345678123456781234567812345678/sub.": {
+ CommitID: "1234567812345678123456781234567812345678123456781234567812345678",
+ SubPath: "/sub",
+ },
+ "http://a/b/c/d/e/1234567812345678123456781234567812345678123456781234567812345678?a=b.": {
+ CommitID: "1234567812345678123456781234567812345678123456781234567812345678",
+ },
+ "http://a/b/c/d/e/1234567812345678123456781234567812345678123456781234567812345678?a=b&c=d": {
+ CommitID: "1234567812345678123456781234567812345678123456781234567812345678",
+ },
+ "http://a/b/c/d/e/1234567812345678123456781234567812345678123456781234567812345678#hash.": {
+ CommitID: "1234567812345678123456781234567812345678123456781234567812345678",
+ QueryHash: "hash",
},
}
for k, v := range testCases {
- assert.Equal(t, anyHashPattern.FindStringSubmatch(k)[1:], v)
+ ret, ok := anyHashPatternExtract(k)
+ if v.CommitID == "" {
+ assert.False(t, ok)
+ } else {
+ assert.EqualValues(t, strings.TrimSuffix(k, "."), ret.FullURL)
+ assert.EqualValues(t, v.CommitID, ret.CommitID)
+ assert.EqualValues(t, v.SubPath, ret.SubPath)
+ assert.EqualValues(t, v.QueryHash, ret.QueryHash)
+ }
}
}
diff --git a/modules/markup/html_test.go b/modules/markup/html_test.go
index 916e74fb62..a2ae18d777 100644
--- a/modules/markup/html_test.go
+++ b/modules/markup/html_test.go
@@ -124,6 +124,11 @@ func TestRender_CrossReferences(t *testing.T) {
test(
util.URLJoin(markup.TestAppURL, "gogitea", "some-repo-name", "issues", "12345"),
`