Skip to content

Commit

Permalink
chore: fix comment-bot
Browse files Browse the repository at this point in the history
  • Loading branch information
casperdcl committed Aug 21, 2022
1 parent e12c6e4 commit d8ad81a
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/comment-bot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@ jobs:
uses: actions/github-script@v6
with:
script: |
const perm = await github.repos.getCollaboratorPermissionLevel({
const perm = await github.rest.repos.getCollaboratorPermissionLevel({
owner: context.repo.owner, repo: context.repo.repo,
username: context.payload.comment.user.login})
post = (context.eventName == "issue_comment"
? github.reactions.createForIssueComment
: github.reactions.createForPullRequestReviewComment)
? github.rest.reactions.createForIssueComment
: github.rest.reactions.createForPullRequestReviewComment)
if (!["admin", "write"].includes(perm.data.permission)){
post({
owner: context.repo.owner, repo: context.repo.repo,
Expand All @@ -44,8 +44,8 @@ jobs:
with:
script: |
post = (context.eventName == "issue_comment"
? github.reactions.createForIssueComment
: github.reactions.createForPullRequestReviewComment)
? github.rest.reactions.createForIssueComment
: github.rest.reactions.createForPullRequestReviewComment)
post({
owner: context.repo.owner, repo: context.repo.repo,
comment_id: context.payload.comment.id, content: "rocket"})
Expand Down

0 comments on commit d8ad81a

Please sign in to comment.