-
-
Notifications
You must be signed in to change notification settings - Fork 124
41 lines (34 loc) · 1.66 KB
/
Copy pathpr-comment.yml
File metadata and controls
41 lines (34 loc) · 1.66 KB
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
name: Greet on Pull Request
on:
pull_request_target:
types: [opened]
permissions:
pull-requests: write
issues: write
jobs:
greet-and-discord:
runs-on: ubuntu-latest
steps:
- name: Add comment on PR
uses: actions/github-script@v6
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
const prAuthor = context.payload.pull_request.user.login;
const prNumber = context.payload.pull_request.number;
const message = `
👋 **Hi @${prAuthor}**, thank you for opening this Pull Request! \n@neeraj1907 is your mentor.
🔧 Please ensure the following:
- ✅ Resolve any **merge conflicts**, if they exist.make sure you have updated your local repo to avoid conflicts. and solve in your local repo. do not solve in github editor.try to solve in your local repo in vs code or any other editor.
- 🧾 Clearly **mention the issue number** you are solving (e.g., \`Fixes #issue_number\`).
- 📎 Please **update your PR description** if anything is unclear or incorrect.
- 📷 Attach a **screenshot or screen recording** of your fix.
- 💬 Kindly **share the PR link in the Discord server manually** for better tracking.
- if follow the guidelines and fit to project then label according to pr otherwise close the pr.
Happy Contributing! 🚀`;
await github.rest.issues.createComment({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: prNumber,
body: message
});