Skip to content

Commit

Permalink
wip: pr-comment-ci
Browse files Browse the repository at this point in the history
  • Loading branch information
liweijie0812 committed Jun 25, 2024
1 parent bf98584 commit 0138dd6
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions .github/workflows/pr-comment-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
})
Expand Down

0 comments on commit 0138dd6

Please sign in to comment.