diff --git a/.github/workflows/pr-comment-ci.yml b/.github/workflows/pr-comment-ci.yml index eb519a8..8e3797b 100644 --- a/.github/workflows/pr-comment-ci.yml +++ b/.github/workflows/pr-comment-ci.yml @@ -17,11 +17,16 @@ jobs: with: script: | let next_action = '' - const fs = import('fs') + let isReviewer = false; + const user = context.payload.comment.user.login + core.debug(`user: ${user}`) + + const fs = require('fs') const CODEOWNERS = fs.readFileSync('.github/CODEOWNERS', 'utf8') - const isReviewer = false; + core.debug(`CODEOWNERS: ${CODEOWNERS}`) + CODEOWNERS.match(/@\w+/g).forEach((owner) => { - if (owner === `@${context.payload.comment.user.login}`) { + if (owner === `@${user}`) { isReviewer = true } })