|
|
|
@ -235,7 +235,11 @@ func (i *Issue) HasLabel(labelID int64) bool { |
|
|
|
|
func (issue *Issue) sendLabelUpdatedWebhook(doer *User) { |
|
|
|
|
var err error |
|
|
|
|
if issue.IsPull { |
|
|
|
|
issue.PullRequest.Issue = issue |
|
|
|
|
err = issue.PullRequest.LoadIssue() |
|
|
|
|
if err != nil { |
|
|
|
|
log.Error(4, "LoadIssue: %v", err) |
|
|
|
|
return |
|
|
|
|
} |
|
|
|
|
err = PrepareWebhooks(issue.Repo, HOOK_EVENT_PULL_REQUEST, &api.PullRequestPayload{ |
|
|
|
|
Action: api.HOOK_ISSUE_LABEL_UPDATED, |
|
|
|
|
Index: issue.Index, |
|
|
|
@ -335,7 +339,11 @@ func (issue *Issue) ClearLabels(doer *User) (err error) { |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if issue.IsPull { |
|
|
|
|
issue.PullRequest.Issue = issue |
|
|
|
|
err = issue.PullRequest.LoadIssue() |
|
|
|
|
if err != nil { |
|
|
|
|
log.Error(4, "LoadIssue: %v", err) |
|
|
|
|
return |
|
|
|
|
} |
|
|
|
|
err = PrepareWebhooks(issue.Repo, HOOK_EVENT_PULL_REQUEST, &api.PullRequestPayload{ |
|
|
|
|
Action: api.HOOK_ISSUE_LABEL_CLEARED, |
|
|
|
|
Index: issue.Index, |
|
|
|
|