wow-actions / auto-comment

💬 Automatically comment issues or PRs on events triggered
MIT License
36 stars 13 forks source link

Comment when PR is merged #22

Open reveurguy opened 2 years ago

reveurguy commented 2 years ago

Hii I want to add an auto-comment when the PR is merged, is there any way to do that?

github-actions[bot] commented 2 years ago

👋 @reveurguy Thank you for raising an issue. We will investigate into the matter and get back to you as soon as possible. Please make sure you have given us as much context as possible.

reveurguy commented 2 years ago

Also the comment when PR is closed is not working. When PR is opened, the comment is working fine

bubkoo commented 2 years ago

@reveurguy

Explicitly specify the PR "closed" event is work for me. And "merged" event is supported in this PR. Try the following configuration:

name: Auto Comment
on:
  pull_request:
    types: [closed]
jobs:
  run:
    runs-on: ubuntu-latest
    steps:
      - uses: wow-actions/auto-comment@v1
        with:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

          pullRequestClosed: >
            👋 @{{ author }} This PR is closed.

          pullRequestMerged: >
            👋 @{{ author }} This PR is merged.