Add Automated PR Comment on Pull Request Creation
Description
Set up a GitHub Actions workflow that automatically posts a welcome/checklist comment when a new pull request is created. This helps contributors know exactly what needs to be checked and ensures consistent PR quality.
What Needs to Be Done
- Create a new workflow file:
.github/workflows/pr-welcome.yml
- The workflow should trigger on
pull_request events (type: opened)
- Post an automated comment with:
- Welcome message thanking the contributor
- PR checklist reminders (self-review, tests, screenshots for UI changes)
- DSCWoC label reminders (
dscwoc + difficulty label required)
- Link to contribution guidelines
Example Workflow
name: PR Welcome Comment
on:
pull_request:
types: [opened]
jobs:
comment:
runs-on: ubuntu-latest
permissions:
pull-requests: write
steps:
- uses: actions/github-script@v7
with:
script: |
github.rest.issues.createComment({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: context.payload.pull_request.number,
body: "Thank you for your contribution! Please ensure..."
});
Files to Create
.github/workflows/pr-welcome.yml
Acceptance Criteria
Add Automated PR Comment on Pull Request Creation
Description
Set up a GitHub Actions workflow that automatically posts a welcome/checklist comment when a new pull request is created. This helps contributors know exactly what needs to be checked and ensures consistent PR quality.
What Needs to Be Done
.github/workflows/pr-welcome.ymlpull_requestevents (type:opened)dscwoc+ difficulty label required)Example Workflow
Files to Create
.github/workflows/pr-welcome.ymlAcceptance Criteria