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