This commit is contained in:
Adam Majer 2024-08-26 13:30:54 +02:00
parent 26ce19dd2e
commit 4146290df8

View File

@ -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: