-
Notifications
You must be signed in to change notification settings - Fork 51
41 lines (37 loc) · 1.96 KB
/
greetings.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: Greetings
on:
pull_request_target:
types: [opened, synchronized, reopened]
issues:
types: [opened, closed]
jobs:
greeting:
runs-on: ubuntu-latest
permissions:
issues: write
pull-requests: write
steps:
# Greet on new issue
- name: Greet on new issue
if: github.event_name == 'issues' && github.event.action == 'opened'
uses: actions/first-interaction@v1
with:
issue-message: "Thank you @${{ github.actor }} for raising an issue! We appreciate your effort in helping us improve. Our team will review it shortly. Stay tuned!"
# Greet on new pull request
- name: Greet on new pull request
if: github.event_name == 'pull_request_target' && github.event.action == 'opened'
uses: actions/first-interaction@v1
with:
pr-message: "Thank you @${{ github.actor }} for your contribution! Your pull request has been submitted successfully. A maintainer will review it as soon as possible. We appreciate your support in making this project better."
# Congratulate on closed issue
# - name: Congratulate on closed issue
# if: github.event_name == 'issues' && github.event.action == 'closed'
# run: |
# echo "Congratulations to @${{ github.event.issue.user.login }} for closing your issue!"
# echo "If you enjoyed contributing, please consider giving us a ⭐ and following us for updates!"
# # Post a comment on the issue
# curl -X POST \
# -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \
# -H "Accept: application/vnd.github.v3+json" \
# https://api.github.com/repos/${{ github.repository }}/issues/${{ github.event.issue.number }}/comments \
# -d "{\"body\": \"Congratulations to @${{ github.event.issue.user.login }} for closing your issue! If you enjoyed contributing, please consider giving us a ⭐ on GitHub and following us for updates!\"}"