@@ -19,17 +19,24 @@ jobs:
19
19
20
20
- name : Add Comment on Pull Request
21
21
if : ${{ github.event_name == 'pull_request' }}
22
- uses : peter-evans/create-or-update-comment@v3
22
+ uses : actions/github-script@v6
23
23
with :
24
- token : ${{ secrets.GITHUB_TOKEN }}
25
- repository : ${{ github.repository }}
26
- issue-number : ${{ github.event.pull_request.number }}
27
- body : |
28
- 🚀 **Hello @${{ github.event.pull_request.user.login }}!**
24
+ github-token : ${{ secrets.GITHUB_TOKEN }}
25
+ script : |
26
+ const issueNumber = context.issue.number;
27
+ const contributor = context.issue.pull_request.user.login;
28
+ const relatedIssue = context.issue.pull_request.issue.number;
29
+
30
+ const commentBody = `🚀 **Hello @${contributor}!**
29
31
30
32
Thank you for your contribution to the **Leetcode Journal** project! 🎉
31
33
We value your effort and are excited to review your changes.
32
34
35
+ **PR Details:**
36
+
37
+ * **Contributor:** @${contributor}
38
+ * **Related Issue:** Closes #${relatedIssue} (if applicable)
39
+
33
40
### PR Checklist:
34
41
Please ensure your PR adheres to the following checklist:
35
42
- [ ] PR description includes a summary and context for the changes.
@@ -45,26 +52,56 @@ jobs:
45
52
The team will review your PR shortly. If you have any questions, feel free to ask here!
46
53
Happy Coding! 🚀
47
54
55
+ const params = {
56
+ owner: context.repo.owner,
57
+ repo: context.repo.repo,
58
+ issue_number: issueNumber,
59
+ body: commentBody
60
+ };
61
+
62
+ github.rest.issues.createComment(params);
63
+
48
64
- name : Add Comment on Issue
49
65
if : ${{ github.event_name == 'issues' }}
50
- uses : peter-evans/create-or-update-comment@v3
66
+ uses : actions/github-script@v6
51
67
with :
52
- token : ${{ secrets.GITHUB_TOKEN }}
53
- repository : ${{ github.repository }}
54
- issue-number : ${{ github.event.issue.number }}
55
- body : |
56
- 👋 **Hello @${{ github.event.issue.user.login }}!**
68
+ github-token : ${{ secrets.GITHUB_TOKEN }}
69
+ script : |
70
+ const issueNumber = context.issue.number;
71
+ const contributor = context.issue.user.login;
57
72
73
+ const commentBody = `👋 **Hello @${contributor}!**
74
+
58
75
Thank you for raising an issue in the **Leetcode Journal** project!
59
76
Your issue has been logged, and the team will review it shortly.
60
77
78
+ **Issue Details:**
79
+
80
+ * **Contributor:** @${contributor}
81
+
61
82
### Issue Handling Checklist:
62
83
- [ ] Make sure the issue includes clear steps to reproduce (if applicable).
63
84
- [ ] Provide relevant context, screenshots, or logs.
64
85
- [ ] Mention if this issue blocks any critical workflows.
86
+ - [ ] **If it's a Feature Request:**
87
+ * Explain the desired functionality, including:
88
+ * Approach: How you envision implementing this feature.
89
+ * Benefits: How this feature will improve the project.
90
+ - [ ] **If it's a Bug:**
91
+ * Describe how to resolve it without affecting the working of the project.
92
+
65
93
66
94
### Notifications:
67
95
- **Project Admin:** @yashksaini-coder
68
96
- **Mentor:** @ompharate
69
97
70
- We'll get back to you soon. Stay tuned! 🚀
98
+ We'll get back to you soon. Stay tuned! 🚀
99
+
100
+ const params = {
101
+ owner: context.repo.owner,
102
+ repo: context.repo.repo,
103
+ issue_number: issueNumber,
104
+ body: commentBody
105
+ };
106
+
107
+ github.rest.issues.createComment(params);
0 commit comments