From 4d9349123fb6102357c39a728c55d648a16be3b8 Mon Sep 17 00:00:00 2001 From: Jimmy Praet Date: Sun, 17 Jan 2021 15:15:57 +0100 Subject: label and milestone webhooks on issue/pull creation (#14363) --- services/pull/pull.go | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'services/pull') diff --git a/services/pull/pull.go b/services/pull/pull.go index 1886448ee0..92f1ff65fb 100644 --- a/services/pull/pull.go +++ b/services/pull/pull.go @@ -59,6 +59,12 @@ func NewPullRequest(repo *models.Repository, pull *models.Issue, labelIDs []int6 } notification.NotifyNewPullRequest(pr, mentions) + if len(pull.Labels) > 0 { + notification.NotifyIssueChangeLabels(pull.Poster, pull, pull.Labels, nil) + } + if pull.Milestone != nil { + notification.NotifyIssueChangeMilestone(pull.Poster, pull, 0) + } // add first push codes comment baseGitRepo, err := git.OpenRepository(pr.BaseRepo.RepoPath()) -- cgit v1.2.3