From 6a052fba05ab6f38d45d11c896290f90fef17006 Mon Sep 17 00:00:00 2001 From: silentcodeg <105681448+silentcodeg@users.noreply.github.com> Date: Wed, 18 May 2022 17:04:12 +0200 Subject: [PATCH 1/5] [doctor] explain what enable-push-options does (#19740) --- modules/doctor/misc.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/doctor/misc.go b/modules/doctor/misc.go index 60c190cf9884b..8489a5ef41b8f 100644 --- a/modules/doctor/misc.go +++ b/modules/doctor/misc.go @@ -207,7 +207,7 @@ func init() { Priority: 6, }) Register(&Check{ - Title: "Enable push options", + Title: "Check that all git repositories have receive.advertisePushOptions set to true", Name: "enable-push-options", IsDefault: false, Run: checkEnablePushOptions, From 260a28d8d59b7402653799ef1370f3641483940f Mon Sep 17 00:00:00 2001 From: Eekle <96976531+Eekle@users.noreply.github.com> Date: Wed, 18 May 2022 22:36:49 +0100 Subject: [PATCH 2/5] Improved ref comment link when origin is body/title (#19741) * Makes comments in body text/title return the base page URL instead of "" in RefCommentHTMLURL() * Add comment explaining branch Co-authored-by: delvh --- models/issue_xref.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/models/issue_xref.go b/models/issue_xref.go index c4f0080edd06a..3c9e67c3f86a8 100644 --- a/models/issue_xref.go +++ b/models/issue_xref.go @@ -295,8 +295,9 @@ func CommentTypeIsRef(t CommentType) bool { // RefCommentHTMLURL returns the HTML URL for the comment that created this reference func (comment *Comment) RefCommentHTMLURL() string { + // Edge case for when the reference is inside the title or the description of the referring issue if comment.RefCommentID == 0 { - return "" + return comment.RefIssueHTMLURL() } if err := comment.LoadRefComment(); err != nil { // Silently dropping errors :unamused: log.Error("LoadRefComment(%d): %v", comment.RefCommentID, err) From ad551bffc1768245db075aa3d1b998b6f5997ae4 Mon Sep 17 00:00:00 2001 From: delvh Date: Thu, 19 May 2022 03:59:28 +0200 Subject: [PATCH 3/5] Fix incorrect translation key (#19744) Co-authored-by: techknowlogick --- models/unit/unit.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/models/unit/unit.go b/models/unit/unit.go index 9d3cae5f25c81..e94775413e4e7 100644 --- a/models/unit/unit.go +++ b/models/unit/unit.go @@ -284,7 +284,7 @@ var ( TypePackages, "repo.packages", "/packages", - "repo.packages.desc", + "packages.desc", 6, perm.AccessModeRead, } From c27268db21427fcf6f8d90cce8713febdb6f4719 Mon Sep 17 00:00:00 2001 From: silentcodeg <105681448+silentcodeg@users.noreply.github.com> Date: Thu, 19 May 2022 15:46:56 +0200 Subject: [PATCH 4/5] [doctor] do not update User Stars numbers unless --fix (#19750) --- modules/doctor/misc.go | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/modules/doctor/misc.go b/modules/doctor/misc.go index 8489a5ef41b8f..9bee78303e1a5 100644 --- a/modules/doctor/misc.go +++ b/modules/doctor/misc.go @@ -75,9 +75,14 @@ func checkHooks(ctx context.Context, logger log.Logger, autofix bool) error { } func checkUserStarNum(ctx context.Context, logger log.Logger, autofix bool) error { - if err := models.DoctorUserStarNum(); err != nil { - logger.Critical("Unable update User Stars numbers") - return err + if autofix { + if err := models.DoctorUserStarNum(); err != nil { + logger.Critical("Unable update User Stars numbers") + return err + } + logger.Info("Updated User Stars numbers.") + } else { + logger.Info("No check available for User Stars numbers (skipped)") } return nil } From 3e5ea9a9788b4c908a85b7ccc532e559ab8610a0 Mon Sep 17 00:00:00 2001 From: "Guo Y.K" Date: Thu, 19 May 2022 23:20:34 +0800 Subject: [PATCH 5/5] Update base.go (#19739) use http.StatusTemporaryRedirect(307) when serve avatar directly browser caches 301 redirections, pre-signed s3 url would expire at some later point Co-authored-by: Lunny Xiao Co-authored-by: techknowlogick --- routers/web/base.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/routers/web/base.go b/routers/web/base.go index 938abaef81631..5f817c77ce78b 100644 --- a/routers/web/base.go +++ b/routers/web/base.go @@ -62,7 +62,7 @@ func storageHandler(storageSetting setting.Storage, prefix string, objStore stor w, req, u.String(), - http.StatusPermanentRedirect, + http.StatusTemporaryRedirect, ) }) }