We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 563433f commit 2447f37Copy full SHA for 2447f37
1 file changed
.github/workflows/pr-merge-automate-message.yml
@@ -0,0 +1,30 @@
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
22
+ const commentBody = `🎉 Congrats @${prAuthor} on getting your PR merged! 🙌
23
+ Thanks for the contribution — looking forward to more from you 🚀`;
24
25
+ await github.rest.issues.createComment({
26
+ owner: context.repo.owner,
27
+ repo: context.repo.repo,
28
+ issue_number: prNumber,
29
+ body: commentBody
30
+ });
0 commit comments