mirror of
https://github.com/go-gitea/gitea.git
synced 2026-10-08 12:02:56 +02:00
Set HeadCommit when creating tags. (#18116)
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
This commit is contained in:
1 parent
72f9050689
commit
8fa97a25f0
2 files changed
+15
-2
No files matched your search
@@ -72,13 +72,17 @@ func createTag(gitRepo *git.Repository, rel *models.Release, msg string) (bool,
|
||||
created = true
|
||||
rel.LowerTagName = strings.ToLower(rel.TagName)
|
||||
|
||||
commits := repository.NewPushCommits()
|
||||
commits.HeadCommit = repository.CommitToPushCommit(commit)
|
||||
commits.CompareURL = rel.Repo.ComposeCompareURL(git.EmptySHA, commit.ID.String())
|
||||
|
||||
notification.NotifyPushCommits(
|
||||
rel.Publisher, rel.Repo,
|
||||
&repository.PushUpdateOptions{
|
||||
RefFullName: git.TagPrefix + rel.TagName,
|
||||
OldCommitID: git.EmptySHA,
|
||||
NewCommitID: commit.ID.String(),
|
||||
}, repository.NewPushCommits())
|
||||
}, commits)
|
||||
notification.NotifyCreateRef(rel.Publisher, rel.Repo, "tag", git.TagPrefix+rel.TagName)
|
||||
rel.CreatedUnix = timeutil.TimeStampNow()
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user