Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Send tag create and push webhook when release created on UI #8671

Merged
merged 18 commits into from
Nov 22, 2019
Merged
Changes from 13 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions services/release/release.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,15 @@ func createTag(gitRepo *git.Repository, rel *models.Release) error {
if err != nil {
return fmt.Errorf("CommitsCount: %v", err)
}
// Prepare Notify
if err := rel.LoadAttributes(); err != nil {
lafriks marked this conversation as resolved.
Show resolved Hide resolved
log.Error("LoadAttributes: %v", err)
return err
}
notification.NotifyPushCommits(
rel.Publisher, rel.Repo, git.TagPrefix+rel.TagName,
git.EmptySHA, commit.ID.String(), models.NewPushCommits())
notification.NotifyCreateRef(rel.Publisher, rel.Repo, "tag", git.TagPrefix+rel.TagName)
} else {
rel.CreatedUnix = timeutil.TimeStampNow()
}
Expand Down