Skip to content

Commit 0acbebc

Browse files
committed
feat: add automated workflow to greet contributors upon PR merge
1 parent 9621345 commit 0acbebc

1 file changed

Lines changed: 27 additions & 0 deletions

File tree

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: PR Merged Greeter
2+
3+
on:
4+
pull_request_target:
5+
types: [closed]
6+
7+
permissions:
8+
pull-requests: write
9+
issues: write
10+
11+
jobs:
12+
thank-contributor:
13+
if: github.event.pull_request.merged == true
14+
runs-on: ubuntu-latest
15+
steps:
16+
- name: Leave Welcome & Discord Comment
17+
uses: actions/github-script@v7
18+
with:
19+
script: |
20+
const creator = context.payload.pull_request.user.login;
21+
const message = `🎉 **Congratulations @${creator}! Your PR has been successfully merged.** 🚀\n\nThank you for contributing to **CommitPulse**. Your work helps us build a better tool for the community.\n\n⚠️ **Important for GSSoC Contributors:**\nYou are strictly advised to join our [Discord Server](https://discord.gg/Cb73bS79j) as it is **mandatory** for all GSSoC participants. All important announcements, point claims, and community discussions happen there.\n\nKeep building! 💻✨`;
22+
await github.rest.issues.createComment({
23+
owner: context.repo.owner,
24+
repo: context.repo.repo,
25+
issue_number: context.payload.pull_request.number,
26+
body: message
27+
});

0 commit comments

Comments
 (0)