This action can be used to post a dynamic comment on a github PR
Optional The comment you would like to post. Default ''
.
Optional A JSON comment you would like to post. Default ''
.
Optional Path to a file containing MarkDown
(preffered) syntax with your comment.
Required The value of your GitHub Actions GitHub Token, this is
usually: ${{ secrets.GITHUB_TOKEN }}
.
Make sure your GITHUB_TOKEN
has the proper permissions to write on a pull-request.
Check here how to add permissions if necessary.
permissions:
checks: read
contents: read
pull-requests: write
uses: JoseThen/comment-pr@v1.2.0
with:
comment: 'This PR is the bees knees!'
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
uses: JoseThen/comment-pr@v1.2.0
with:
json: '{ "this": "pr", "is": "the", "bees": "knees"}'
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
uses: JoseThen/comment-pr@v1.2.0
with:
file_path: './tmp/pr-comment.md'
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
-
You need
vercel/ncc
installed withnpm i -g @vercel/ncc
before you can compile the logic. -
To build just make sure
npm ci
has been run and usencc build index.js
-
If you don't want to download
nodejs
andnpm
you can keep this containerized on the fly withdocker run --rm -it -v .:/app node:lts bash
and work from the/app
dir in the container.
Thanks goes to these wonderful people (emoji key):
Ciaran Evans 📖 |
Bruno Henrique da Silva 📖 |
This project follows the all-contributors specification. Contributions of any kind welcome!