feat: Adds Greeting PR workflows #1
Workflow file for this run
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: Merge Thank You | |
on: | |
pull_request_target: | |
types: [closed] | |
permissions: | |
issues: write | |
pull-requests: write | |
jobs: | |
post_merge_message: | |
if: github.event.pull_request.merged == true | |
runs-on: ubuntu-latest | |
steps: | |
- name: Post thank you message | |
uses: actions/github-script@v7 | |
with: | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
script: | | |
const prNumber = context.payload.pull_request.number; | |
const owner = context.repo.owner; | |
const repo = context.repo.repo; | |
// Post a thank you message upon PR merge | |
await github.rest.issues.createComment({ | |
owner: owner, | |
repo: repo, | |
issue_number: prNumber, | |
body: `🎉🎉 Thank you for your contribution! Your PR #${prNumber} has been merged! 🎉🎉` | |
}); |