lawliet89 / comment-when-approved-action

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

comment-when-approved-action

This github action posts a comment to pull requests when they get approved. Inspired by pullreminders/label-when-approved-action.

Usage

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 comment
  • REACTION: Optional. The github reaction to be added to the comment
  • TRIGGER_LABELS: Optional. Only pull requests with these labels will trigger this action. Labels should be separated by a comma.

Demo

About

License:MIT License


Languages

Language:JavaScript 89.8%Language:Dockerfile 10.2%