summaryrefslogtreecommitdiffstats
path: root/services/pull/pull.go
diff options
context:
space:
mode:
authorJimmy Praet <jimmy.praet@telenet.be>2021-01-17 15:15:57 +0100
committerGitHub <noreply@github.com>2021-01-17 16:15:57 +0200
commit4d9349123fb6102357c39a728c55d648a16be3b8 (patch)
treea9a75d2b7eeecbbf077a6690c992703b2fc4a72a /services/pull/pull.go
parente6155ff9b689872b3797fe1e2504e5919b0c4888 (diff)
downloadgitea-4d9349123fb6102357c39a728c55d648a16be3b8.tar.gz
gitea-4d9349123fb6102357c39a728c55d648a16be3b8.zip
label and milestone webhooks on issue/pull creation (#14363)
Diffstat (limited to 'services/pull/pull.go')
-rw-r--r--services/pull/pull.go6
1 files changed, 6 insertions, 0 deletions
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())