Skip to content

Commit

Permalink
build: automatically add a thank you note on PR merge
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
igaw committed Jan 20, 2025
1 parent fe3b962 commit 771cf44
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions .github/workflows/thanks.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Comment on Merged PR

on:
pull_request:
types:
- closed

jobs:
comment-on-merge:
if: github.event.pull_request.merged == true
runs-on: ubuntu-latest

steps:
- name: Comment on merged PR
uses: actions/github-script@v7
with:
script: |
const prNumber = context.payload.pull_request.number;
const comment = 'Thanks for your contribution!';
await github.issues.createComment({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: prNumber,
body: comment,
});

0 comments on commit 771cf44

Please sign in to comment.