diff options
author | Lanre Adelowo <yo@lanre.wtf> | 2020-10-22 01:55:25 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-10-21 20:55:25 -0400 |
commit | e9186362839749a83f4fcff2b01fc39de1ef4f45 (patch) | |
tree | 10c4334527968f46d06d572e0058d696e196bcad /services/release/release.go | |
parent | 819901b3e9c187aed1d29f7b58599ed61075781a (diff) | |
download | gitea-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 'services/release/release.go')
-rw-r--r-- | services/release/release.go | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/services/release/release.go b/services/release/release.go index c36e2126ed..af97987a27 100644 --- a/services/release/release.go +++ b/services/release/release.go @@ -58,6 +58,12 @@ func createTag(gitRepo *git.Repository, rel *models.Release) error { if err != nil { return fmt.Errorf("CommitsCount: %v", err) } + + u, err := models.GetUserByEmail(commit.Author.Email) + if err == nil { + rel.PublisherID = u.ID + } + } else { rel.CreatedUnix = timeutil.TimeStampNow() } |