From 4146290df85171e1b482df00495d7ac7cb4012758869e68294d4b4321ea18ab5 Mon Sep 17 00:00:00 2001 From: Adam Majer Date: Mon, 26 Aug 2024 13:30:54 +0200 Subject: [PATCH] . --- gitea-events-rabbitmq-publisher/main.go | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/gitea-events-rabbitmq-publisher/main.go b/gitea-events-rabbitmq-publisher/main.go index 6f1b10a..1ff8012 100644 --- a/gitea-events-rabbitmq-publisher/main.go +++ b/gitea-events-rabbitmq-publisher/main.go @@ -245,6 +245,20 @@ func parseRequestJSON(reqType string, data []byte) (org *common.Organization, ex org = issue.Repository.Owner extraAction = issue.Action + case "pull_request_review_rejected", "pull_request_review_approved": + issue := common.PullRequestWebhookEvent{} + if err = json.Unmarshal(data, &issue); err != nil { + return + } + switch issue.Action { + case "reviewed": + break + default: + err = fmt.Errorf("Unknown PR Assign webhook action type: %s", issue.Action) + return + } + org = issue.Repository.Owner + extraAction = issue.Action default: