Skip to content

Commit 771cf44

Browse files
committed
build: automatically add a thank you note on PR merge
Be friendly and add a thank you note to all merged PRs. Currently, I type it always by hand. Signed-off-by: Daniel Wagner <[email protected]>
1 parent fe3b962 commit 771cf44

1 file changed

Lines changed: 26 additions & 0 deletions

File tree

.github/workflows/thanks.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: Comment on Merged PR
2+
3+
on:
4+
pull_request:
5+
types:
6+
- closed
7+
8+
jobs:
9+
comment-on-merge:
10+
if: github.event.pull_request.merged == true
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- name: Comment on merged PR
15+
uses: actions/github-script@v7
16+
with:
17+
script: |
18+
const prNumber = context.payload.pull_request.number;
19+
const comment = 'Thanks for your contribution!';
20+
21+
await github.issues.createComment({
22+
owner: context.repo.owner,
23+
repo: context.repo.repo,
24+
issue_number: prNumber,
25+
body: comment,
26+
});

0 commit comments

Comments
 (0)