1
1
mirror of https://github.com/go-gitea/gitea synced 2025-07-22 18:28:37 +00:00

Refactor: Move PushUpdateOptions (#13363)

Co-authored-by: Antoine GIRARD <sapk@users.noreply.github.com>
This commit is contained in:
Lunny Xiao
2020-10-31 05:59:02 +08:00
committed by GitHub
parent dd12384f22
commit 4df2ed29f2
15 changed files with 169 additions and 146 deletions

View File

@@ -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()
}