Simplify PR template #1
Workflow file for this run
This file contains hidden or 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: PR Comment | |
on: | |
pull_request: | |
types: [opened] | |
jobs: | |
add-comment: | |
runs-on: ubuntu-latest | |
permissions: | |
pull-requests: write | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Add PR Checklist Comment | |
uses: actions/github-script@v6 | |
with: | |
script: | | |
const fs = require('fs'); | |
const path = require('path'); | |
// Read the checklist from the markdown file | |
const checklistPath = path.join(process.env.GITHUB_WORKSPACE, '.github', 'pr-comments', 'checklist.md'); | |
const commentBody = fs.readFileSync(checklistPath, 'utf8'); | |
// Create a comment with the checklist content | |
await github.rest.issues.createComment({ | |
issue_number: context.issue.number, | |
owner: context.repo.owner, | |
repo: context.repo.repo, | |
body: commentBody | |
}); |