@@ -172,14 +172,26 @@ func (n *actionsNotifier) IssueChangeMilestone(ctx context.Context, doer *user_m
172
172
} else {
173
173
action = api .HookIssueDemilestoned
174
174
}
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 )
176
182
}
177
183
178
184
func (n * actionsNotifier ) IssueChangeLabels (ctx context.Context , doer * user_model.User , issue * issues_model.Issue ,
179
185
_ , _ []* issues_model.Label ,
180
186
) {
181
187
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 )
183
195
}
184
196
185
197
func notifyIssueChange (ctx context.Context , doer * user_model.User , issue * issues_model.Issue , event webhook_module.HookEventType , action api.HookIssueAction ) {
0 commit comments