forked from forgejo/forgejo
Refactor: Move PushUpdateOptions (#13363)
Co-authored-by: Antoine GIRARD <sapk@users.noreply.github.com>
This commit is contained in:
parent
dd12384f22
commit
4df2ed29f2
15 changed files with 169 additions and 146 deletions
|
@ -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()
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue