@@ -172,14 +172,26 @@ func (n *actionsNotifier) IssueChangeMilestone(ctx context.Context, doer *user_m
172172 } else {
173173 action = api .HookIssueDemilestoned
174174 }
175- notifyIssueChange (ctx , doer , issue , webhook_module .HookEventPullRequestMilestone , action )
175+
176+ hookEvent := webhook_module .HookEventIssueMilestone
177+ if issue .IsPull {
178+ hookEvent = webhook_module .HookEventPullRequestMilestone
179+ }
180+
181+ notifyIssueChange (ctx , doer , issue , hookEvent , action )
176182}
177183
178184func (n * actionsNotifier ) IssueChangeLabels (ctx context.Context , doer * user_model.User , issue * issues_model.Issue ,
179185 _ , _ []* issues_model.Label ,
180186) {
181187 ctx = withMethod (ctx , "IssueChangeLabels" )
182- notifyIssueChange (ctx , doer , issue , webhook_module .HookEventPullRequestLabel , api .HookIssueLabelUpdated )
188+
189+ hookEvent := webhook_module .HookEventIssueLabel
190+ if issue .IsPull {
191+ hookEvent = webhook_module .HookEventPullRequestLabel
192+ }
193+
194+ notifyIssueChange (ctx , doer , issue , hookEvent , api .HookIssueLabelUpdated )
183195}
184196
185197func notifyIssueChange (ctx context.Context , doer * user_model.User , issue * issues_model.Issue , event webhook_module.HookEventType , action api.HookIssueAction ) {
0 commit comments