-
Notifications
You must be signed in to change notification settings - Fork 11
31 lines (27 loc) · 1.18 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
name: Greetings
on:
issues:
types: [opened]
pull_request:
types: [opened]
permissions:
issues: write
pull-requests: write
jobs:
greeting:
runs-on: ubuntu-latest
steps:
- name: Send greeting for issues
if: github.event_name == 'issues'
run: |
curl -s -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": "Hello @${{ github.actor }}, 👋 Thank you for creating an issue in our repository. We appreciate your contribution!"}'
- name: Send greeting for pull requests
if: github.event_name == 'pull_request'
run: |
curl -s -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.pull_request.number }}/comments \
-d '{"body": "Hello @${{ github.actor }}, 👋 Thank you for creating a pull request in our repository. We appreciate your contribution!"}'