Thank Developers #3
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: Thank You on Star | |
on: | |
watch: | |
types: [started] | |
jobs: | |
thank: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Thank the user | |
run: | | |
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 $GITHUB_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 | |