diff --git a/gitea-events-rabbitmq-publisher/main.go b/gitea-events-rabbitmq-publisher/main.go index 877bdcb..e026a16 100644 --- a/gitea-events-rabbitmq-publisher/main.go +++ b/gitea-events-rabbitmq-publisher/main.go @@ -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":