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