-
Notifications
You must be signed in to change notification settings - Fork 23
93 lines (79 loc) · 3.36 KB
/
autoComment.yaml
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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
name: Auto Comment on Issues and PRs
on:
issues:
types: [opened]
pull_request:
types:
- opened
jobs:
auto-comment:
runs-on: ubuntu-latest
permissions:
issues: write
pull-requests: write
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Add Comment on Pull Request
if: ${{ github.event_name == 'pull_request' }}
uses: peter-evans/create-or-update-comment@v3
with:
token: ${{ secrets.GITHUB_TOKEN }}
repository: ${{ github.repository }}
issue-number: ${{ github.event.pull_request.number }}
body: |
🚀 **Hello @${{ github.event.pull_request.user.login }}!**
Thank you for your contribution to the **Leetcode Journal** project! 🎉
We value your effort and are excited to review your changes.
### PR Checklist:
Please ensure your PR adheres to the following checklist:
- [ ] PR description includes a summary and context for the changes.
- [ ] Relevant dependencies have been listed.
- [ ] Testing section is filled out with details on verification.
- [ ] Screenshots/Videos are attached (if applicable).
- [ ] Checklist items are marked as completed.
### Review Notifications:
- **Project Admin:** @yashksaini-coder
- **Mentor:** @ompharate
The team will review your PR shortly. If you have any questions, feel free to ask here!
Happy Coding! 🚀
# Add labels to the pull request
- name: Add Labels to Pull Request
if: ${{ github.event_name == 'pull_request' }}
uses: actions-ecosystem/action-add-labels@v1
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
labels: 'Under Review'
number: ${{ github.event.pull_request.number }}
# Request a review for the pull request
- name: Request Review on Pull Request
if: ${{ github.event_name == 'pull_request' }}
uses: actions/github-script@v6
with:
script: |
github.rest.pulls.requestReviewers({
owner: context.repo.owner,
repo: context.repo.repo,
pull_number: context.payload.pull_request.number,
reviewers: ['yashksaini-coder']
})
# Add a comment to the issue
- name: Add Comment on Issue
if: ${{ github.event_name == 'issues' }}
uses: peter-evans/create-or-update-comment@v3
with:
token: ${{ secrets.GITHUB_TOKEN }}
repository: ${{ github.repository }}
issue-number: ${{ github.event.issue.number }}
body: |
👋 **Hello @${{ github.event.issue.user.login }}!**
Thank you for raising an issue in the **Leetcode Journal** project!
Your issue has been logged, and the team will review it shortly.
### Issue Handling Checklist:
- [ ] Make sure the issue includes clear steps to reproduce (if applicable).
- [ ] Provide relevant context, screenshots, or logs.
- [ ] Mention if this issue blocks any critical workflows.
### Notifications:
- **Project Admin:** @yashksaini-coder
- **Mentor:** @ompharate
We'll get back to you soon. Stay tuned! 🚀