Test "Issue Comment Handler" action, "hello" in descirption #4
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: 'Hello Comment Response' | |
on: | |
issue_comment: | |
types: [created] | |
jobs: | |
commentReply: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check for specific comment | |
uses: actions/github-script@v5 | |
with: | |
script: | | |
const issueComment = context.payload.comment.body | |
if (issueComment === 'hello') { | |
github.rest.issues.createComment({ | |
issue_number: context.payload.issue.number, | |
owner: context.repo.owner, | |
repo: context.repo.repo, | |
body: 'hola!' | |
}) | |
} |