Skip to content

Commit 26765a6

Browse files
author
Vasudev Jaiswal
authored
Update invitation.yml
1 parent 0e34674 commit 26765a6

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

.github/workflows/invitation.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,3 +22,18 @@ jobs:
2222
Tips for practising:<br>It's about collaboration, communication, and adding value<br>I hope that helps
2323
env:
2424
INVITE_TOKEN: ${{ secrets.INVITE_TOKEN }}
25+
26+
- name: Post message and close the issue
27+
run: |
28+
# Get the issue number
29+
ISSUE_NUMBER=$(echo "${{ github.event.issue.number }}")
30+
31+
# Post a message on the issue
32+
curl -X POST -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \
33+
-d '{"body": "The invitation has been sent to join the GitHub Organization. The issue will now be closed. Feel free to reach out with any questions!"}' \
34+
"https://api.github.com/repos/${{ github.repository }}/issues/$ISSUE_NUMBER/comments"
35+
36+
# Close the issue
37+
curl -X PATCH -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \
38+
-d '{"state": "closed"}' \
39+
"https://api.github.com/repos/${{ github.repository }}/issues/$ISSUE_NUMBER"

0 commit comments

Comments
 (0)