1
0
mirror of https://github.com/go-gitea/gitea.git synced 2024-05-11 05:55:29 +00:00

label and milestone webhooks on issue/pull creation (#14363)

This commit is contained in:
Jimmy Praet
2021-01-17 15:15:57 +01:00
committed by GitHub
parent e6155ff9b6
commit 4d9349123f
2 changed files with 12 additions and 0 deletions

View File

@ -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())