Browse Source

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

tags/v1.15.0-dev
Jimmy Praet 3 years ago
parent
commit
4d9349123f
No account linked to committer's email address
2 changed files with 12 additions and 0 deletions
  1. 6
    0
      services/issue/issue.go
  2. 6
    0
      services/pull/pull.go

+ 6
- 0
services/issue/issue.go View File

} }


notification.NotifyNewIssue(issue, mentions) notification.NotifyNewIssue(issue, mentions)
if len(issue.Labels) > 0 {
notification.NotifyIssueChangeLabels(issue.Poster, issue, issue.Labels, nil)
}
if issue.Milestone != nil {
notification.NotifyIssueChangeMilestone(issue.Poster, issue, 0)
}


return nil return nil
} }

+ 6
- 0
services/pull/pull.go View File

} }


notification.NotifyNewPullRequest(pr, mentions) 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 // add first push codes comment
baseGitRepo, err := git.OpenRepository(pr.BaseRepo.RepoPath()) baseGitRepo, err := git.OpenRepository(pr.BaseRepo.RepoPath())

Loading…
Cancel
Save