From 829c34129c4b3b1d9a2e4b519892868d7ade866a Mon Sep 17 00:00:00 2001 From: Lunny Xiao Date: Tue, 3 Dec 2024 07:59:07 -0800 Subject: [PATCH] Quick fix for license file name (#32696) --- routers/web/repo/release.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/routers/web/repo/release.go b/routers/web/repo/release.go index 96c512dd3d..c178ba2491 100644 --- a/routers/web/repo/release.go +++ b/routers/web/repo/release.go @@ -31,6 +31,7 @@ import ( "code.gitea.io/gitea/services/context/upload" "code.gitea.io/gitea/services/forms" releaseservice "code.gitea.io/gitea/services/release" + repo_service "code.gitea.io/gitea/services/repository" ) const ( @@ -193,6 +194,8 @@ func Releases(ctx *context.Context) { pager.SetDefaultParams(ctx) ctx.Data["Page"] = pager + ctx.Data["LicenseFileName"] = repo_service.LicenseFileName + ctx.HTML(http.StatusOK, tplReleasesList) } @@ -251,6 +254,7 @@ func TagsList(ctx *context.Context) { pager.SetDefaultParams(ctx) ctx.Data["Page"] = pager ctx.Data["PageIsViewCode"] = !ctx.Repo.Repository.UnitEnabled(ctx, unit.TypeReleases) + ctx.Data["LicenseFileName"] = repo_service.LicenseFileName ctx.HTML(http.StatusOK, tplTagsList) }