feat: filter empty reviews

This commit is contained in:
shiftinv 2022-09-03 03:31:48 +02:00
parent b9ce7c7fd4
commit 5fb5a26209

View File

@ -20,6 +20,11 @@ export default function filter(headers: Headers, json: any, config: UrlConfig):
return "no-op issue event";
}
if (event === "pull_request_review") {
if (json.action !== "submitted") return "no-op PR review event";
else if (json.review?.body === null) return "empty PR review";
}
const login: string | undefined = json.sender?.login?.toLowerCase();
if (
login &&