Day 06 #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: Pull Request Comment | |
on: | |
pull_request: | |
types: [opened] | |
jobs: | |
comment: | |
runs-on: windows-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v2 | |
- name: Comment on Pull Request | |
uses: actions/github-script@v4 | |
with: | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
script: | | |
const github = context.github; | |
const { owner, repo } = context.repo; | |
const prNumber = context.payload.pull_request.number; | |
const comment = "Thank you for raising pull request. It will be reviewed soon."; | |
github.issues.createComment({ | |
owner, | |
repo, | |
issue_number: prNumber, | |
body: comment | |
}); |