Skip to content

Commit 29c1ebc

Browse files
authored
Merge pull request #522 from Adez017/worflows
Added workflows for a thank you
2 parents 7f9ab60 + e94ca1d commit 29c1ebc

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: Auto Comment on PR Merged
2+
3+
on:
4+
pull_request_target:
5+
types: [closed]
6+
7+
permissions:
8+
pull-requests: write
9+
10+
jobs:
11+
comment:
12+
if: github.event.pull_request.merged == true
13+
runs-on: ubuntu-latest
14+
steps:
15+
- name: Add Comment to Merged Pull Request
16+
uses: actions/github-script@v6
17+
with:
18+
script: |
19+
const prNumber = context.issue.number;
20+
const prAuthor = context.payload.pull_request.user.login;
21+
const commentBody = `### 🎉 Congrats on getting your PR merged, @${prAuthor}! 🙌🏼\n\nThanks for your contribution every effort helps improve the project.\n\nLooking forward to seeing more from you! 🥳✨`;
22+
23+
await github.rest.issues.createComment({
24+
owner: context.repo.owner,
25+
repo: context.repo.repo,
26+
issue_number: prNumber,
27+
body: commentBody
28+
});

0 commit comments

Comments
 (0)