Skip to content

Commit 7e0e755

Browse files
Merge pull request #46 from RickCreator87/RickCreator87-patch-47
Create Greet New Contributor
2 parents daa587e + e026ba3 commit 7e0e755

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

Greet New Contributor

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
// Check if the user is a first-time contributor
2+
const { data: pullRequests } = await github.rest.pulls.list({
3+
owner,
4+
repo,
5+
state: 'all',
6+
creator: sender,
7+
});
8+
9+
if (pullRequests.length === 1) {
10+
await github.rest.issues.createComment({
11+
owner,
12+
repo,
13+
issue_number,
14+
body: `Hello @${sender}! 👋 Thanks for your first contribution to the **Profitable-Forecast-Bot** project! We really appreciate your effort.
15+
16+
Please make sure to read our contributing guidelines to ensure your pull request can be merged smoothly. If you have any questions, feel free to ask here.
17+
Happy coding! ✨`
18+
});
19+
}

0 commit comments

Comments
 (0)