@@ -19,17 +19,24 @@ jobs:
1919
2020 - name : Add Comment on Pull Request
2121 if : ${{ github.event_name == 'pull_request' }}
22- uses : peter-evans/create-or-update-comment@v3
22+ uses : actions/github-script@v6
2323 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}!**
2931
3032 Thank you for your contribution to the **Leetcode Journal** project! 🎉
3133 We value your effort and are excited to review your changes.
3234
35+ **PR Details:**
36+
37+ * **Contributor:** @${contributor}
38+ * **Related Issue:** Closes #${relatedIssue} (if applicable)
39+
3340 ### PR Checklist:
3441 Please ensure your PR adheres to the following checklist:
3542 - [ ] PR description includes a summary and context for the changes.
@@ -45,26 +52,56 @@ jobs:
4552 The team will review your PR shortly. If you have any questions, feel free to ask here!
4653 Happy Coding! 🚀
4754
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+
4864 - name : Add Comment on Issue
4965 if : ${{ github.event_name == 'issues' }}
50- uses : peter-evans/create-or-update-comment@v3
66+ uses : actions/github-script@v6
5167 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;
5772
73+ const commentBody = `👋 **Hello @${contributor}!**
74+
5875 Thank you for raising an issue in the **Leetcode Journal** project!
5976 Your issue has been logged, and the team will review it shortly.
6077
78+ **Issue Details:**
79+
80+ * **Contributor:** @${contributor}
81+
6182 ### Issue Handling Checklist:
6283 - [ ] Make sure the issue includes clear steps to reproduce (if applicable).
6384 - [ ] Provide relevant context, screenshots, or logs.
6485 - [ ] 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+
6593
6694 ### Notifications:
6795 - **Project Admin:** @yashksaini-coder
6896 - **Mentor:** @ompharate
6997
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