-
Notifications
You must be signed in to change notification settings - Fork 238
29 lines (25 loc) · 915 Bytes
/
pr-merge.yml
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
name: Auto Comment on PR Merge
on:
pull_request:
types: [closed]
jobs:
comment:
if: github.event.pull_request.merged == true
runs-on: ubuntu-latest
steps:
- name: Check out repository
uses: actions/checkout@v2
- name: Add Comment to Merged PR
uses: actions/github-script@v5
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
const { owner, repo } = context.repo;
const number = context.payload.pull_request.number;
const body = "🎉 Your pull request has been successfully merged! 🎉 Thank you for your contribution to our project. Your efforts are greatly appreciated. Keep up the fantastic work! 🚀";
await github.rest.issues.createComment({
owner: owner,
repo: repo,
issue_number: number,
body: body
});