Skip to content

Commit

Permalink
Create thank_you.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
hegdepavankumar authored Nov 10, 2023
1 parent 7b3ea91 commit 174c68f
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions .github/workflows/thank_you.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Thank You on Star

on:
watch:
types: [started]

jobs:
thank:
runs-on: ubuntu-latest
steps:
- name: Thank the user
run: |
access_token=$GITHUB_TOKEN
username=hegdepavankumar
repo=VMware-Workstation-Pro-17-Licence-Keys
issue_number=1
api_url="https://api.github.com/repos/${username}/${repo}/issues/${issue_number}/comments"
message="Thank you, @${{ github.actor }} 🌟! We appreciate your support."
response=$(curl -X POST -s -H "Authorization: Bearer $access_token" -H "Accept: application/vnd.github.v3+json" -d "{\"body\":\"$message\"}" $api_url)
if [[ $(echo $response | jq -r '.id') != null ]]; then
echo "Thank-you message posted successfully!"
else
echo "Error posting thank-you message. Response: $response"
exit 1
fi

0 comments on commit 174c68f

Please sign in to comment.