Skip to content

Commit

Permalink
Update CommentPR.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
amontoison committed Sep 10, 2022
1 parent fc8bb59 commit 26c4856
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/CommentPR.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,13 +44,14 @@ jobs:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
var fs = require('fs')
var issue_number = Number(fs.readFileSync('./NR'))
var msg = fs.readFileSync('./MSG', 'utf8')
// Get the existing comments.
const {data: comments} = await github.rest.issues.listComments({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: context.payload.number
issue_number: issue_number
})
// Find any comment already made by the bot.
Expand All @@ -67,7 +68,7 @@ jobs:
await github.rest.issues.createComment({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: context.payload.number,
issue_number: issue_number,
body: msg
})
}

0 comments on commit 26c4856

Please sign in to comment.