diff --git a/src/main.ts b/src/main.ts index adf041c..cf1acfd 100644 --- a/src/main.ts +++ b/src/main.ts @@ -16,7 +16,7 @@ async function run(): Promise { }); for (const pr of pullRequests) { - console.log(`${pr.title} (${pr.number})`); + console.log(`${pr.title} (${pr.number}), author: ${pr.user.login}`); // cleaning up old glados comments. // comments are sorted by default @@ -91,6 +91,11 @@ async function run(): Promise { if (reviews.data.length >= 1) { let _approves = {}; for (const review of reviews.data) { + if (review.user.login === pr.user.login) { + // comments by the PR author do not count + continue; + } + // if (review["state"] === "COMMENTED") continue; if (review["state"] !== "APPROVED") { console.log("NOT approved by", review.user.login);