π [MISC] - Add a Pull Request template #1
This file contains 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: Welcome | |
on: | |
issues: | |
types: [opened] | |
pull_request: | |
types: [opened] | |
jobs: | |
welcome: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Comment | |
uses: actions/github-script@v5 | |
with: | |
script: | | |
const isIssue = context.payload.issue !== undefined; | |
const item = isIssue ? context.payload.issue : context.payload.pull_request; | |
const userType = isIssue ? 'issue' : 'pull request'; | |
const message = ` | |
Hello @${item.user.login}, | |
Thank you for your ${userType}! π Your effort helps improve our project. | |
Our team will review your ${userType} shortly. In the meantime, feel free | |
to check out the [Hacktoberfest Code of Conduct](https://hacktoberfest.digitalocean.com/resources/conduct) | |
and engage with our community. | |
We appreciate your contribution and look forward to collaborating with you! | |
Best, | |
FahimFBA(python) Team | |
`; | |
github.rest.issues.createComment({ | |
issue_number: item.number, | |
owner: context.repo.owner, | |
repo: context.repo.repo, | |
body: message | |
}); |