From 4df2ed29f28194513c59733e369152b8f8bc1d36 Mon Sep 17 00:00:00 2001 From: Lunny Xiao Date: Sat, 31 Oct 2020 05:59:02 +0800 Subject: Refactor: Move PushUpdateOptions (#13363) Co-authored-by: Antoine GIRARD --- services/release/release.go | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'services/release') diff --git a/services/release/release.go b/services/release/release.go index af97987a27..0e04a71898 100644 --- a/services/release/release.go +++ b/services/release/release.go @@ -43,8 +43,12 @@ func createTag(gitRepo *git.Repository, rel *models.Release) error { return err } notification.NotifyPushCommits( - rel.Publisher, rel.Repo, git.TagPrefix+rel.TagName, - git.EmptySHA, commit.ID.String(), repository.NewPushCommits()) + rel.Publisher, rel.Repo, + &repository.PushUpdateOptions{ + RefFullName: git.TagPrefix + rel.TagName, + OldCommitID: git.EmptySHA, + NewCommitID: commit.ID.String(), + }, repository.NewPushCommits()) notification.NotifyCreateRef(rel.Publisher, rel.Repo, "tag", git.TagPrefix+rel.TagName) rel.CreatedUnix = timeutil.TimeStampNow() } -- cgit v1.2.3