-
Notifications
You must be signed in to change notification settings - Fork 0
41 lines (32 loc) · 1.3 KB
/
hello.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
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: Install GitHub CLI
run: |
sudo apt-get update
sudo apt-get install -y gh
- name: Authenticate GitHub CLI
run: |
echo "${{ secrets.PERSONAL_ACCESS_TOKEN }}" | gh auth login --with-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.PERSONAL_ACCESS_TOKEN }}
- name: Celebrate with a confetti message
run: |
echo "🎊 Hooray! Your pull request has been acknowledged. Thank you for helping make our project awesome! 🎊"