terms&condition successfully changed #69
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: PR Thank You Bot | |
on: | |
pull_request: | |
types: [opened, closed] | |
jobs: | |
thank_you: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Send Welcome Comment | |
if: ${{ github.event.action == 'opened' }} | |
uses: actions/github-script@v6 | |
with: | |
script: | | |
const issue_number = context.payload.pull_request.number; | |
const owner = context.repo.owner; | |
const repo = context.repo.repo; | |
const body = 'Thank you for your contribution! 🎉 We appreciate your effort in making our project better. Please provide any additional information if needed.'; | |
github.rest.issues.createComment({ | |
issue_number: issue_number, | |
owner: owner, | |
repo: repo, | |
body: body | |
}); | |
- name: Send Merge Comment | |
if: ${{ github.event.action == 'closed' && github.event.pull_request.merged == true }} | |
uses: actions/github-script@v6 | |
with: | |
script: | | |
const issue_number = context.payload.pull_request.number; | |
const owner = context.repo.owner; | |
const repo = context.repo.repo; | |
const body = '🎉 Congrats, your changes were accepted !!! 🙌 Your contribution has been successfully integrated into the project. Great job!'; | |
github.rest.issues.createComment({ | |
issue_number: issue_number, | |
owner: owner, | |
repo: repo, | |
body: body | |
}); |