Skip to content
Update or create a new comment to PR or Issue.
Crystal Makefile Dockerfile Ruby
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
src
.dockerignore
.gitignore
Brewfile
CODE_OF_CONDUCT.md
Dockerfile
LICENSE
Makefile
README.md
shard.yml

README.md

PRCOMMENT

Creates or updates single comment to Github PR or Issue.

Usage

Binaries

export GITHUB_TOKEN=<personal token>
prcomment -i 1 -r miry/prcomment Hello from console

Docker

docker run -e GITHUB_TOKEN=<token> --rm -it miry/prcomment:0.1.1 -i 1 -r miry/prcomment Hello

Crystal

export GITHUB_TOKEN=<personal token>
crystal run src/cli.cr -- -i 1 -r miry/prcomment Hello

Options

Match

One of the cases to have comment to show current test coverage. By default, prcomment looks for first comment with same text.

crystal run src/cli.cr -- -i 1 -r miry/prcomment -m "Test coverage \d*%" Test coverage 80%  # Creates a comment with text: 'Test coverage 80%'
crystal run src/cli.cr -- -i 1 -r miry/prcomment -m "Test coverage \d*%" Test coverage 130% # Finds the comment and replaces with: 'Test coverage 130%'

It is also usefull to change previous answer with new one:

crystal run src/cli.cr -- -i 1 -r miry/prcomment -m ":[+-]1:" ":+1:"  # Creates a comment with icon: ':+1'
crystal run src/cli.cr -- -i 1 -r miry/prcomment -m ":[+-]1:" ":-1:"  # Replaces with ':-1:'
You can’t perform that action at this time.