-
Notifications
You must be signed in to change notification settings - Fork 14
43 lines (40 loc) · 1.58 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
42
43
name: Greetings
on:
pull_request_target:
types: [opened, reopened, closed]
issues:
types: [opened]
jobs:
greeting:
runs-on: ubuntu-latest
permissions:
issues: write
pull-requests: write
steps:
- uses: actions/first-interaction@v1
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
issue-message: "👋 Thank you for raising an issue! We appreciate your effort in helping us improve. Our DDoL team will review it shortly. Stay tuned!"
pr-message: "🎉 Thank you for your contribution! Your pull request has been submitted successfully. A maintainer from DDoL team will review it as soon as possible. We appreciate your support in making this project better."
congratulate:
if: github.event.action == 'closed' && github.event.pull_request.merged == true
runs-on: ubuntu-latest
permissions:
issues: write
pull-requests: write
steps:
- name: Comment on the PR
uses: actions/github-script@v6
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
const prNumber = context.payload.pull_request.number;
const message = `
🎉 Congratulations on getting your pull request merged! Thank you for your contribution to the project.
If you enjoy working with us, consider giving us a star on GitHub ⭐ and following us on our socials!
`;
await github.pulls.createReviewComment({
...context.repo,
pull_number: prNumber,
body: message,
});