From: Daniel Wagner Date: Mon, 20 Jan 2025 09:05:24 +0000 (+0100) Subject: build: automatically add a thank you note on PR merge X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=771cf444e93926003fe6d40e15313dee7cc30933;p=users%2Fsagi%2Fnvme-cli.git 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 --- diff --git a/.github/workflows/thanks.yml b/.github/workflows/thanks.yml new file mode 100644 index 00000000..fc5be9d5 --- /dev/null +++ b/.github/workflows/thanks.yml @@ -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, + });