@@ -51,7 +51,7 @@ func (m *webhookNotifier) NotifyIssueClearLabels(doer *models.User, issue *model
5151 err = webhook_services .PrepareWebhooks (issue .Repo , models .HookEventPullRequestLabel , & api.PullRequestPayload {
5252 Action : api .HookIssueLabelCleared ,
5353 Index : issue .Index ,
54- PullRequest : convert .ToAPIPullRequest (issue .PullRequest ),
54+ PullRequest : convert .ToAPIPullRequest (issue .PullRequest , nil ),
5555 Repository : convert .ToRepo (issue .Repo , mode ),
5656 Sender : convert .ToUser (doer , nil ),
5757 })
@@ -145,7 +145,7 @@ func (m *webhookNotifier) NotifyIssueChangeAssignee(doer *models.User, issue *mo
145145 issue .PullRequest .Issue = issue
146146 apiPullRequest := & api.PullRequestPayload {
147147 Index : issue .Index ,
148- PullRequest : convert .ToAPIPullRequest (issue .PullRequest ),
148+ PullRequest : convert .ToAPIPullRequest (issue .PullRequest , nil ),
149149 Repository : convert .ToRepo (issue .Repo , mode ),
150150 Sender : convert .ToUser (doer , nil ),
151151 }
@@ -197,7 +197,7 @@ func (m *webhookNotifier) NotifyIssueChangeTitle(doer *models.User, issue *model
197197 From : oldTitle ,
198198 },
199199 },
200- PullRequest : convert .ToAPIPullRequest (issue .PullRequest ),
200+ PullRequest : convert .ToAPIPullRequest (issue .PullRequest , nil ),
201201 Repository : convert .ToRepo (issue .Repo , mode ),
202202 Sender : convert .ToUser (doer , nil ),
203203 })
@@ -232,7 +232,7 @@ func (m *webhookNotifier) NotifyIssueChangeStatus(doer *models.User, issue *mode
232232 // Merge pull request calls issue.changeStatus so we need to handle separately.
233233 apiPullRequest := & api.PullRequestPayload {
234234 Index : issue .Index ,
235- PullRequest : convert .ToAPIPullRequest (issue .PullRequest ),
235+ PullRequest : convert .ToAPIPullRequest (issue .PullRequest , nil ),
236236 Repository : convert .ToRepo (issue .Repo , mode ),
237237 Sender : convert .ToUser (doer , nil ),
238238 }
@@ -301,7 +301,7 @@ func (m *webhookNotifier) NotifyNewPullRequest(pull *models.PullRequest, mention
301301 if err := webhook_services .PrepareWebhooks (pull .Issue .Repo , models .HookEventPullRequest , & api.PullRequestPayload {
302302 Action : api .HookIssueOpened ,
303303 Index : pull .Issue .Index ,
304- PullRequest : convert .ToAPIPullRequest (pull ),
304+ PullRequest : convert .ToAPIPullRequest (pull , nil ),
305305 Repository : convert .ToRepo (pull .Issue .Repo , mode ),
306306 Sender : convert .ToUser (pull .Issue .Poster , nil ),
307307 }); err != nil {
@@ -322,7 +322,7 @@ func (m *webhookNotifier) NotifyIssueChangeContent(doer *models.User, issue *mod
322322 From : oldContent ,
323323 },
324324 },
325- PullRequest : convert .ToAPIPullRequest (issue .PullRequest ),
325+ PullRequest : convert .ToAPIPullRequest (issue .PullRequest , nil ),
326326 Repository : convert .ToRepo (issue .Repo , mode ),
327327 Sender : convert .ToUser (doer , nil ),
328328 })
@@ -500,7 +500,7 @@ func (m *webhookNotifier) NotifyIssueChangeLabels(doer *models.User, issue *mode
500500 err = webhook_services .PrepareWebhooks (issue .Repo , models .HookEventPullRequestLabel , & api.PullRequestPayload {
501501 Action : api .HookIssueLabelUpdated ,
502502 Index : issue .Index ,
503- PullRequest : convert .ToAPIPullRequest (issue .PullRequest ),
503+ PullRequest : convert .ToAPIPullRequest (issue .PullRequest , nil ),
504504 Repository : convert .ToRepo (issue .Repo , models .AccessModeNone ),
505505 Sender : convert .ToUser (doer , nil ),
506506 })
@@ -542,7 +542,7 @@ func (m *webhookNotifier) NotifyIssueChangeMilestone(doer *models.User, issue *m
542542 err = webhook_services .PrepareWebhooks (issue .Repo , models .HookEventPullRequestMilestone , & api.PullRequestPayload {
543543 Action : hookAction ,
544544 Index : issue .Index ,
545- PullRequest : convert .ToAPIPullRequest (issue .PullRequest ),
545+ PullRequest : convert .ToAPIPullRequest (issue .PullRequest , nil ),
546546 Repository : convert .ToRepo (issue .Repo , mode ),
547547 Sender : convert .ToUser (doer , nil ),
548548 })
@@ -609,7 +609,7 @@ func (*webhookNotifier) NotifyMergePullRequest(pr *models.PullRequest, doer *mod
609609 // Merge pull request calls issue.changeStatus so we need to handle separately.
610610 apiPullRequest := & api.PullRequestPayload {
611611 Index : pr .Issue .Index ,
612- PullRequest : convert .ToAPIPullRequest (pr ),
612+ PullRequest : convert .ToAPIPullRequest (pr , nil ),
613613 Repository : convert .ToRepo (pr .Issue .Repo , mode ),
614614 Sender : convert .ToUser (doer , nil ),
615615 Action : api .HookIssueClosed ,
@@ -642,7 +642,7 @@ func (m *webhookNotifier) NotifyPullRequestChangeTargetBranch(doer *models.User,
642642 From : oldBranch ,
643643 },
644644 },
645- PullRequest : convert .ToAPIPullRequest (issue .PullRequest ),
645+ PullRequest : convert .ToAPIPullRequest (issue .PullRequest , nil ),
646646 Repository : convert .ToRepo (issue .Repo , mode ),
647647 Sender : convert .ToUser (doer , nil ),
648648 })
@@ -681,7 +681,7 @@ func (m *webhookNotifier) NotifyPullRequestReview(pr *models.PullRequest, review
681681 if err := webhook_services .PrepareWebhooks (review .Issue .Repo , reviewHookType , & api.PullRequestPayload {
682682 Action : api .HookIssueReviewed ,
683683 Index : review .Issue .Index ,
684- PullRequest : convert .ToAPIPullRequest (pr ),
684+ PullRequest : convert .ToAPIPullRequest (pr , nil ),
685685 Repository : convert .ToRepo (review .Issue .Repo , mode ),
686686 Sender : convert .ToUser (review .Reviewer , nil ),
687687 Review : & api.ReviewPayload {
@@ -736,7 +736,7 @@ func (m *webhookNotifier) NotifyPullRequestSynchronized(doer *models.User, pr *m
736736 if err := webhook_services .PrepareWebhooks (pr .Issue .Repo , models .HookEventPullRequestSync , & api.PullRequestPayload {
737737 Action : api .HookIssueSynchronized ,
738738 Index : pr .Issue .Index ,
739- PullRequest : convert .ToAPIPullRequest (pr ),
739+ PullRequest : convert .ToAPIPullRequest (pr , nil ),
740740 Repository : convert .ToRepo (pr .Issue .Repo , models .AccessModeNone ),
741741 Sender : convert .ToUser (doer , nil ),
742742 }); err != nil {
0 commit comments