aboutsummaryrefslogtreecommitdiffstats
path: root/routers
diff options
context:
space:
mode:
authorLanre Adelowo <yo@lanre.wtf>2020-10-22 01:55:25 +0100
committerGitHub <noreply@github.com>2020-10-21 20:55:25 -0400
commite9186362839749a83f4fcff2b01fc39de1ef4f45 (patch)
tree10c4334527968f46d06d572e0058d696e196bcad /routers
parent819901b3e9c187aed1d29f7b58599ed61075781a (diff)
downloadgitea-e9186362839749a83f4fcff2b01fc39de1ef4f45.tar.gz
gitea-e9186362839749a83f4fcff2b01fc39de1ef4f45.zip
Enhance release list (#6025)
* show author for releases created outside Gitea UI. Also show the number of commits behind the default branch for tags created outside the UI don't show the tag date again for tags pushed to the repo. Since it is already on the sidebar and looks like duplication * add migration for already existing tags * update as per review * fix build * add space * fix import statments * Update models/migrations/v113.go Co-Authored-By: zeripath <art27@cantab.net> * Update models/migrations/v114.go Co-authored-by: 6543 <6543@obermui.de> * Update services/release/release.go Co-authored-by: 6543 <6543@obermui.de> * impruve * remove dependency on models package * Close the gitrepos in a defer to ensure that they are closed. * gofmt Co-authored-by: zeripath <art27@cantab.net> Co-authored-by: 6543 <6543@obermui.de> Co-authored-by: techknowlogick <techknowlogick@gitea.io>
Diffstat (limited to 'routers')
-rw-r--r--routers/repo/release.go1
1 files changed, 1 insertions, 0 deletions
diff --git a/routers/repo/release.go b/routers/repo/release.go
index ab251ec755..73c42ec7c4 100644
--- a/routers/repo/release.go
+++ b/routers/repo/release.go
@@ -57,6 +57,7 @@ func calReleaseNumCommitsBehind(repoCtx *context.Repository, release *models.Rel
func Releases(ctx *context.Context) {
ctx.Data["Title"] = ctx.Tr("repo.release.releases")
ctx.Data["PageIsReleaseList"] = true
+ ctx.Data["DefaultBranch"] = ctx.Repo.Repository.DefaultBranch
writeAccess := ctx.Repo.CanWrite(models.UnitTypeReleases)
ctx.Data["CanCreateRelease"] = writeAccess && !ctx.Repo.Repository.IsArchived