-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
88a1b12
commit 1c894f6
Showing
1 changed file
with
37 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
name: Personalized Thank You | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
thank_contributor: | ||
name: Thank Contributor | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
|
||
- name: Set up GitHub CLI | ||
uses: cli/cli-action@v2 | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Send Thank You Message | ||
run: | | ||
# Get the PR author | ||
PR_AUTHOR=$(gh pr view ${{ github.event.pull_request.number }} --json author --jq '.author.login') | ||
# Create a thank you message | ||
THANK_YOU_MESSAGE="π Thank you, @${PR_AUTHOR}, for your contribution! π Your pull request has been received and will be reviewed soon. We appreciate your effort and time! π" | ||
# Post the thank you message as a comment on the PR | ||
gh pr comment ${{ github.event.pull_request.number }} --body "$THANK_YOU_MESSAGE" | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Celebrate with a confetti message | ||
run: | | ||
echo "π Hooray! Your pull request has been acknowledged. Thank you for helping make our project awesome! π" |