This github action posts a comment to pull requests when they get approved. Inspired by pullreminders/label-when-approved-action.
Create a new yaml file like the following script and add it to your .github/workflow
.
on: pull_request_review
name: Comment on approved pull requests
jobs:
commentWhenApproved:
name: Comment when approved
runs-on: ubuntu-latest
steps:
- name: Comment when approved
uses: basisai/comment-when-approved-action@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
COMMENT: "Awesome!"
REACTION: "heart"
TRIGGER_LABELS: "some label"
Environment Variables:
COMMENT
: Required. The content of the commentREACTION
: Optional. The github reaction to be added to the commentTRIGGER_LABELS
: Optional. Only pull requests with these labels will trigger this action. Labels should be separated by a comma.