Skip to content

Feature/added validation #3

Feature/added validation

Feature/added validation #3

name: Auto-Respond to New Pull Requests
on:
pull_request_target:
types: [opened]
permissions:
issues: write
pull-requests: write
jobs:
pr_response:
runs-on: ubuntu-latest
steps:
- name: Post automated comment on new PR
uses: actions/github-script@v6
with:
script: |
const prNumber = context.issue.number;
const commentBody = "🚀 Thanks for submitting a Pull Request!\n\n" +
"Our team will review it as soon as possible.\n" +
"Please double-check that your PR follows the guidelines, includes a proper description, and references the related issue number.\n\n" +
"If any merge conflicts pop up, kindly resolve them before the PA reviews your PR.\n\n" +
"Happy coding! 🌟";
await github.rest.issues.createComment({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: prNumber,
body: commentBody
});
console.log('PR comment posted successfully.');