Command line tool for GitHub pull-request (issue) comment.
$ gh-pr-comment title comment
https://github.com/at-wat/setup-gh-pr-comment
- uses: at-wat/setup-gh-pr-comment@v0
...
- run: gh-pr-comment "title" "message"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# Install latest version under ~/.local/bin
$ curl -sL https://raw.githubusercontent.com/at-wat/gh-pr-comment/master/install.sh | sh -s
# Install latest version under /path/to/bin
$ curl -sL https://raw.githubusercontent.com/at-wat/gh-pr-comment/master/install.sh \
| sh -s latest /path/to/bin
# Install specific version under /usr/local/bin
$ curl -sL https://raw.githubusercontent.com/at-wat/gh-pr-comment/master/install.sh \
| sh -s v0.5.0 /path/to/bin
To run gh-pr-comment inside docker container, required environemnt variables can be automatically specified by the following script.
$ docker run [your options...] \
$(bash <(curl -s https://raw.githubusercontent.com/at-wat/gh-pr-comment/master/env.sh)) \
image commands...
env.sh
is also bundled as gh-pr-comment-env.sh
in release archives.
- GITHUB_TOKEN: token with comment write permission
- GITHUB_API_URL_BASE: specify GitHub Enterprise or any custom endpoint URL
- TRAVIS: true
- TRAVIS_PULL_REQUEST_SLUG: owner/repos
- TRAVIS_PULL_REQUEST: pull request number
If your environment handles sensitive information, it is recommended to download install.sh
and env.sh
from https://github.com/at-wat/gh-pr-comment/releases and verify the signature using GPG.
My public key is available at https://github.com/at-wat.gpg and SKS keyserver pool.
(fingerprint: 358B DF63 B4AE D76A 871A E62E 1BF1 686B 468C 35B2
)