From 37d02cf8551f755965304d5eb08739501b7e918e Mon Sep 17 00:00:00 2001 From: Muunatic Date: Mon, 10 Jun 2024 09:58:06 +0700 Subject: [PATCH] fix(prsReview): adjust author_association payload --- src/class/prsReview.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/class/prsReview.ts b/src/class/prsReview.ts index 617a213..f8a7f29 100644 --- a/src/class/prsReview.ts +++ b/src/class/prsReview.ts @@ -85,7 +85,7 @@ export default class PullRequestReview { await this.createReview(reviewMessage, ["Requested Changes"], ["Pending"]); } } - } else if (this.context.payload.pull_request.author_association === "MEMBER" || this.context.payload.pull_request.author_association === "COLLABORATOR") { + } else if (this.context.payload.review.author_association === "MEMBER" || this.context.payload.review.author_association === "COLLABORATOR") { if (this.context.payload.review.state === "approved") { const reviewMessage = `@${this.context.payload.pull_request.user.login} your pull request has been approved by \`[MAINTAINER]\`@${this.context.payload.review.user.login}, please type \`Ready to merge\` for merging`; if (this.context.payload.pull_request.labels.find((a) => a.name === "Requested Changes")) { @@ -144,7 +144,7 @@ export default class PullRequestReview { await this.createReview(reviewMessage, ["Requested Changes"], ["Pending"]); } } - } else if (this.context.payload.pull_request.author_association === "MEMBER" || this.context.payload.pull_request.author_association === "COLLABORATOR") { + } else if (this.context.payload.review.author_association === "MEMBER" || this.context.payload.review.author_association === "COLLABORATOR") { if (this.context.payload.review.state === "approved") { const reviewMessage = `@${this.context.payload.pull_request.user.login} Pull request has been approved by \`[MAINTAINER]\`@${this.context.payload.review.user.login}, please type \`Merge\` for merging @${this.context.payload.review.user.login}`; if (this.context.payload.pull_request.labels.find((a) => a.name === "Requested Changes")) {