Skip to content

Day 6

Day 6 #3

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
});