Skip to content

Simplify PR template #2

Simplify PR template

Simplify PR template #2

Workflow file for this run

name: PR Comment
on:
pull_request: # TODO: Replace with pull_request_target
types: [opened, reopened] # TODO: Remove reopened
jobs:
add-comment:
runs-on: ubuntu-latest
permissions:
pull-requests: write
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Add PR Checklist Comment
uses: actions/github-script@v7
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
});