This commit is contained in:
Adam Majer 2024-08-25 22:31:20 +02:00
parent f664d0fdac
commit b8c7f6c44c

View File

@ -140,6 +140,38 @@ func parseRequestJSON(reqType string, data []byte) (org *common.Organization, ex
org = issue.Repository.Owner
extraAction = issue.Action
case "issue_label":
issue := common.IssueWebhookEvent{}
if err = json.Unmarshal(data, &issue); err != nil {
return
}
switch issue.Action {
case "label_updated", "label_cleared":
break
default:
err = fmt.Errorf("Unknown Issue Assign webhook action type: %s", issue.Action)
return
}
org = issue.Repository.Owner
extraAction = issue.Action
case "issue_milestone":
issue := common.IssueWebhookEvent{}
if err = json.Unmarshal(data, &issue); err != nil {
return
}
switch issue.Action {
case "milestoned", "demilestoned":
break
default:
err = fmt.Errorf("Unknown Issue Assign webhook action type: %s", issue.Action)
return
}
org = issue.Repository.Owner
extraAction = issue.Action
// case "issue_comment":
// case "issue_labelled":