Feature/added validation #3
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: 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.'); |