Skip to content

Commit

Permalink
Create hello.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
utkarsha-deriv authored Aug 14, 2024
1 parent 88a1b12 commit 1c894f6
Showing 1 changed file with 37 additions and 0 deletions.
37 changes: 37 additions & 0 deletions .github/workflows/hello.yml
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! 🎊"

0 comments on commit 1c894f6

Please sign in to comment.