Skip to content

Commit

Permalink
CI: deploy: fix comment-bot
Browse files Browse the repository at this point in the history
  • Loading branch information
casperdcl committed Jul 4, 2020
1 parent 9b331ee commit 865946f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/comment-bot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,22 +7,22 @@ on:

jobs:
tag: # /tag <tagname> <commit>
if: startsWith(github.event.comment.body, "/tag ")
if: startsWith(github.event.comment.body, '/tag ')
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: React Seen
uses: actions/github-script@v2
with:
script: |
perm = github.repos.getCollaboratorPermissionLevel({
const perm = await github.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)
if (!["admin", "write"].includes(perm)){
if (!["admin", "write"].includes(perm.data.permission)){
post({
owner: context.repo.owner, repo: context.repo.repo,
comment_id: context.payload.comment.id, content: "laugh"})
Expand Down

0 comments on commit 865946f

Please sign in to comment.