Skip to content

Commit 400fb38

Browse files
authored
Merge branch 'main' into terraform_state
2 parents 98775ac + 3b839f8 commit 400fb38

File tree

91 files changed

+1279
-1007
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

91 files changed

+1279
-1007
lines changed

.eslintrc.cjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -403,7 +403,7 @@ module.exports = {
403403
'github/a11y-svg-has-accessible-name': [0],
404404
'github/array-foreach': [0],
405405
'github/async-currenttarget': [2],
406-
'github/async-preventdefault': [2],
406+
'github/async-preventdefault': [0], // https://github.com/github/eslint-plugin-github/issues/599
407407
'github/authenticity-token': [0],
408408
'github/get-attribute': [0],
409409
'github/js-class-name': [0],

models/fixtures/access.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -171,3 +171,9 @@
171171
user_id: 40
172172
repo_id: 61
173173
mode: 4
174+
175+
-
176+
id: 30
177+
user_id: 40
178+
repo_id: 1
179+
mode: 2

modules/repository/branch.go

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ package repository
66
import (
77
"context"
88
"fmt"
9-
"strings"
109

1110
"code.gitea.io/gitea/models/db"
1211
git_model "code.gitea.io/gitea/models/git"
@@ -52,9 +51,6 @@ func SyncRepoBranchesWithRepo(ctx context.Context, repo *repo_model.Repository,
5251
{
5352
branches, _, err := gitRepo.GetBranchNames(0, 0)
5453
if err != nil {
55-
if strings.Contains(err.Error(), "ref file is empty") {
56-
return 0, nil
57-
}
5854
return 0, err
5955
}
6056
log.Trace("SyncRepoBranches[%s]: branches[%d]: %v", repo.FullName(), len(branches), branches)

modules/web/handler.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ func wrapHandlerProvider[T http.Handler](hp func(next http.Handler) T, funcInfo
121121
return func(next http.Handler) http.Handler {
122122
h := hp(next) // this handle could be dynamically generated, so we can't use it for debug info
123123
return http.HandlerFunc(func(resp http.ResponseWriter, req *http.Request) {
124-
routing.UpdateFuncInfo(req.Context(), funcInfo)
124+
defer routing.RecordFuncInfo(req.Context(), funcInfo)()
125125
h.ServeHTTP(resp, req)
126126
})
127127
}
@@ -157,7 +157,7 @@ func toHandlerProvider(handler any) func(next http.Handler) http.Handler {
157157
return // it's doing pre-check, just return
158158
}
159159

160-
routing.UpdateFuncInfo(req.Context(), funcInfo)
160+
defer routing.RecordFuncInfo(req.Context(), funcInfo)()
161161
ret := fn.Call(argsIn)
162162

163163
// handle the return value (no-op at the moment)

modules/web/routing/context.go

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -12,16 +12,18 @@ type contextKeyType struct{}
1212

1313
var contextKey contextKeyType
1414

15-
// UpdateFuncInfo updates a context's func info
16-
func UpdateFuncInfo(ctx context.Context, funcInfo *FuncInfo) {
17-
record, ok := ctx.Value(contextKey).(*requestRecord)
18-
if !ok {
19-
return
15+
// RecordFuncInfo records a func info into context
16+
func RecordFuncInfo(ctx context.Context, funcInfo *FuncInfo) (end func()) {
17+
// TODO: reqCtx := reqctx.FromContext(ctx), add trace support
18+
end = func() {}
19+
20+
// save the func info into the context record
21+
if record, ok := ctx.Value(contextKey).(*requestRecord); ok {
22+
record.lock.Lock()
23+
record.funcInfo = funcInfo
24+
record.lock.Unlock()
2025
}
21-
22-
record.lock.Lock()
23-
record.funcInfo = funcInfo
24-
record.lock.Unlock()
26+
return end
2527
}
2628

2729
// MarkLongPolling marks the request is a long-polling request, and the logger may output different message for it

options/locale/locale_cs-CZ.ini

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1683,16 +1683,13 @@ issues.timetracker_timer_manually_add=Přidat čas
16831683

16841684
issues.time_estimate_set=Nastavit odhadovaný čas
16851685
issues.time_estimate_display=Odhad: %s
1686-
issues.change_time_estimate_at=změnil/a odhad času na <b>%s</b> %s
16871686
issues.remove_time_estimate_at=odstranil/a odhad času %s
16881687
issues.time_estimate_invalid=Formát odhadu času je neplatný
16891688
issues.start_tracking_history=započal/a práci %s
16901689
issues.tracker_auto_close=Časovač se automaticky zastaví po zavření tohoto úkolu
16911690
issues.tracking_already_started=`Již jste spustili sledování času na <a href="%s">jiném úkolu</a>!`
1692-
issues.stop_tracking_history=pracoval/a <b>%s</b> %s
16931691
issues.cancel_tracking_history=`zrušil/a sledování času %s`
16941692
issues.del_time=Odstranit tento časový záznam
1695-
issues.add_time_history=přidal/a strávený čas <b>%s</b> %s
16961693
issues.del_time_history=`odstranil/a strávený čas %s`
16971694
issues.add_time_manually=Přidat čas ručně
16981695
issues.add_time_hours=Hodiny
@@ -2155,7 +2152,6 @@ settings.advanced_settings=Pokročilá nastavení
21552152
settings.wiki_desc=Povolit Wiki repozitáře
21562153
settings.use_internal_wiki=Používat vestavěnou Wiki
21572154
settings.default_wiki_branch_name=Výchozí název větve Wiki
2158-
settings.default_wiki_everyone_access=Výchozí přístupová práva pro přihlášené uživatele:
21592155
settings.failed_to_change_default_wiki_branch=Změna výchozí větve wiki se nezdařila.
21602156
settings.use_external_wiki=Používat externí Wiki
21612157
settings.external_wiki_url=URL externí Wiki

options/locale/locale_de-DE.ini

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1678,16 +1678,13 @@ issues.timetracker_timer_manually_add=Zeit hinzufügen
16781678

16791679
issues.time_estimate_set=Geschätzte Zeit festlegen
16801680
issues.time_estimate_display=Schätzung: %s
1681-
issues.change_time_estimate_at=Zeitschätzung geändert zu <b>%s</b> %s
16821681
issues.remove_time_estimate_at=Zeitschätzung %s entfernt
16831682
issues.time_estimate_invalid=Format der Zeitschätzung ist ungültig
16841683
issues.start_tracking_history=hat die Zeiterfassung %s gestartet
16851684
issues.tracker_auto_close=Der Timer wird automatisch gestoppt, wenn dieser Issue geschlossen wird
16861685
issues.tracking_already_started=`Du hast die Zeiterfassung bereits in <a href="%s">diesem Issue</a> gestartet!`
1687-
issues.stop_tracking_history=hat für <b>%s</b> gearbeitet %s
16881686
issues.cancel_tracking_history=`hat die Zeiterfassung %s abgebrochen`
16891687
issues.del_time=Diese Zeiterfassung löschen
1690-
issues.add_time_history=hat <b>%s</b> gearbeitete Zeit hinzugefügt %s
16911688
issues.del_time_history=`hat %s gearbeitete Zeit gelöscht`
16921689
issues.add_time_manually=Zeit manuell hinzufügen
16931690
issues.add_time_hours=Stunden
@@ -2151,7 +2148,6 @@ settings.advanced_settings=Erweiterte Einstellungen
21512148
settings.wiki_desc=Repository-Wiki aktivieren
21522149
settings.use_internal_wiki=Eingebautes Wiki verwenden
21532150
settings.default_wiki_branch_name=Standardbezeichnung für Wiki-Branch
2154-
settings.default_wiki_everyone_access=Standard-Zugriffsberechtigung für angemeldete Benutzer:
21552151
settings.failed_to_change_default_wiki_branch=Das Ändern des Standard-Wiki-Branches ist fehlgeschlagen.
21562152
settings.use_external_wiki=Externes Wiki verwenden
21572153
settings.external_wiki_url=Externe Wiki-URL

options/locale/locale_en-US.ini

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1685,16 +1685,16 @@ issues.timetracker_timer_manually_add = Add Time
16851685
16861686
issues.time_estimate_set = Set estimated time
16871687
issues.time_estimate_display = Estimate: %s
1688-
issues.change_time_estimate_at = changed time estimate to <b>%s</b> %s
1688+
issues.change_time_estimate_at = changed time estimate to <b>%[1]s</b> %[2]s
16891689
issues.remove_time_estimate_at = removed time estimate %s
16901690
issues.time_estimate_invalid = Time estimate format is invalid
16911691
issues.start_tracking_history = started working %s
16921692
issues.tracker_auto_close = Timer will be stopped automatically when this issue gets closed
16931693
issues.tracking_already_started = `You have already started time tracking on <a href="%s">another issue</a>!`
1694-
issues.stop_tracking_history = worked for <b>%s</b> %s
1694+
issues.stop_tracking_history = worked for <b>%[1]s</b> %[2]s
16951695
issues.cancel_tracking_history = `canceled time tracking %s`
16961696
issues.del_time = Delete this time log
1697-
issues.add_time_history = added spent time <b>%s</b> %s
1697+
issues.add_time_history = added spent time <b>%[1]s</b> %[2]s
16981698
issues.del_time_history= `deleted spent time %s`
16991699
issues.add_time_manually = Manually Add Time
17001700
issues.add_time_hours = Hours
@@ -2714,6 +2714,8 @@ branch.create_branch_operation = Create branch
27142714
branch.new_branch = Create new branch
27152715
branch.new_branch_from = Create new branch from "%s"
27162716
branch.renamed = Branch %s was renamed to %s.
2717+
branch.rename_default_or_protected_branch_error = Only admins can rename default or protected branches.
2718+
branch.rename_protected_branch_failed = This branch is protected by glob-based protection rules.
27172719
27182720
tag.create_tag = Create tag %s
27192721
tag.create_tag_operation = Create tag
@@ -3571,7 +3573,8 @@ conda.install = To install the package using Conda, run the following command:
35713573
container.details.type = Image Type
35723574
container.details.platform = Platform
35733575
container.pull = Pull the image from the command line:
3574-
container.digest = Digest:
3576+
container.images = Images
3577+
container.digest = Digest
35753578
container.multi_arch = OS / Arch
35763579
container.layers = Image Layers
35773580
container.labels = Labels

options/locale/locale_fr-FR.ini

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1683,16 +1683,13 @@ issues.timetracker_timer_manually_add=Pointer du temps
16831683
16841684
issues.time_estimate_set=Définir le temps estimé
16851685
issues.time_estimate_display=Estimation : %s
1686-
issues.change_time_estimate_at=a changé le temps estimé à <b>%s</b> %s
16871686
issues.remove_time_estimate_at=a supprimé le temps estimé %s
16881687
issues.time_estimate_invalid=Le format du temps estimé est invalide
16891688
issues.start_tracking_history=`a commencé son travail %s.`
16901689
issues.tracker_auto_close=Le minuteur sera automatiquement arrêté quand le ticket sera fermé.
16911690
issues.tracking_already_started=`Vous avez déjà un minuteur en cours sur <a href="%s">un autre ticket</a> !`
1692-
issues.stop_tracking_history=`a fini de travailler sur <b>%s</b> %s.`
16931691
issues.cancel_tracking_history=`a abandonné son minuteur %s.`
16941692
issues.del_time=Supprimer ce minuteur du journal
1695-
issues.add_time_history=`a pointé du temps de travail %s.`
16961693
issues.del_time_history=`a supprimé son temps de travail %s.`
16971694
issues.add_time_manually=Temps pointé manuellement
16981695
issues.add_time_hours=Heures
@@ -2156,7 +2153,6 @@ settings.advanced_settings=Paramètres avancés
21562153
settings.wiki_desc=Activer le wiki du dépôt
21572154
settings.use_internal_wiki=Utiliser le wiki interne
21582155
settings.default_wiki_branch_name=Nom de la branche du Wiki par défaut
2159-
settings.default_wiki_everyone_access=Autorisation d’accès par défaut pour les utilisateurs connectés :
21602156
settings.failed_to_change_default_wiki_branch=Impossible de modifier la branche du wiki par défaut.
21612157
settings.use_external_wiki=Utiliser un wiki externe
21622158
settings.external_wiki_url=URL Wiki externe

options/locale/locale_ga-IE.ini

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1115,6 +1115,7 @@ blame.ignore_revs=Ag déanamh neamhairde de leasuithe i <a href="%s">.git-blame-
11151115
blame.ignore_revs.failed=Theip ar neamhaird a dhéanamh ar leasuithe i <a href="%s">.git-blame-ignore-revs</a>.
11161116
user_search_tooltip=Taispeáint uasmhéid de 30 úsáideoir
11171117
1118+
tree_path_not_found=Níl cosán %[1]s ann i %[2]s
11181119
11191120
transfer.accept=Glac le hAistriú
11201121
transfer.accept_desc=Aistriú chuig “%s”
@@ -1683,16 +1684,13 @@ issues.timetracker_timer_manually_add=Cuir Am leis
16831684
16841685
issues.time_estimate_set=Socraigh am measta
16851686
issues.time_estimate_display=Meastachán: %s
1686-
issues.change_time_estimate_at=d'athraigh an meastachán ama go <b>%s</b> %s
16871687
issues.remove_time_estimate_at=baineadh meastachán ama %s
16881688
issues.time_estimate_invalid=Tá formáid meastachán ama neamhbhailí
16891689
issues.start_tracking_history=thosaigh ag obair %s
16901690
issues.tracker_auto_close=Stopfar ama go huathoibríoch nuair a dhúnfar an tsaincheist seo
16911691
issues.tracking_already_started=`Tá tús curtha agat cheana féin ag rianú ama ar <a href="%s">eagrán eile</a>!`
1692-
issues.stop_tracking_history=d'oibrigh do <b>%s</b> %s
16931692
issues.cancel_tracking_history=`rianú ama curtha ar ceal %s`
16941693
issues.del_time=Scrios an log ama seo
1695-
issues.add_time_history=cuireadh am caite <b>%s</b> %s leis
16961694
issues.del_time_history=`an t-am caite scriosta %s`
16971695
issues.add_time_manually=Cuir Am leis de Láimh
16981696
issues.add_time_hours=Uaireanta
@@ -2156,7 +2154,6 @@ settings.advanced_settings=Ardsocruithe
21562154
settings.wiki_desc=Cumasaigh Stór Vicí
21572155
settings.use_internal_wiki=Úsáid Vicí Insuite
21582156
settings.default_wiki_branch_name=Ainm Brainse Réamhshocraithe Vicí
2159-
settings.default_wiki_everyone_access=Cead Rochtana Réamhshocraithe d'úsáideoirí sínithe isteach:
21602157
settings.failed_to_change_default_wiki_branch=Theip ar an brainse réamhshocraithe vicí a athrú.
21612158
settings.use_external_wiki=Úsáid Vicí Seachtrach
21622159
settings.external_wiki_url=URL Vicí Seachtrach

0 commit comments

Comments
 (0)