Home

Awesome

action-github-comment

Post a text to GitHub issue / pull request

You can use the fixed version from: Releases

Usage

A whole example is here:

name: github-comment

on: [pull_request]

jobs:
  job1:
    name: github-comment
    runs-on: ubuntu-latest
    steps:
    - name: Post comments to GitHub
      uses: b4b4r07/action-github-comment@v1
      with:
        body: |
          text...
          text...
      env:
        GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
        LOG: trace

Customizing

inputs

The following are optional as step.with keys

NameTypeDescriptionDefault
bodyStringText to be sent to GitHub
repositoryStringGitHub repository. Its style should be like "owner/repo"${{ github.repository }}
numberIntAn issue/pull request number you want to send a comment. Default is pull request number${{ github.event.pull_request.number }}

outputs

The following outputs can be accessed via ${{ steps.<step-id>.outputs }} from this action

NameTypeDescription
n/a

environment variables

The following are as step.env keys

NameDescription
GITHUB_TOKENToken to be used for posting comment
ENVLog level to spit out what happened in github-comment command (trace, debug, info, warn and error are allowed)

License

MIT