prcomment
Version, currently 0.1.24 versions
- 0.1.3latestMar 10, 2024
- 0.1.2not indexedMar 10, 2024
- 0.1.1not indexedMar 10, 2024
- 0.1.0not indexedMar 10, 2024
github.com/miry/prcomment
Creates or updates a comment for Github Pull Request or Github Issue.
Nothing has been indexed for 0.1.2 yet. The tag is recorded, its shard.yml has not been read, so the manifest and dependency list below are empty because they are unknown rather than because they are absent.
Installation
# Add this to your shard.yml
dependencies:
prcomment:
github: miry/prcomment
version: ~> 0.1.2Then run:
shards installshard.yml
No shard.yml has been indexed for 0.1.2. You can read it on the repository.
Dependencies
Unknown: the shard.yml for this version has not been read yet.
README
This README is the one indexed from the repository at its latest ref, not from the tag for this version.
PRCOMMENT
Creates or updates single comment to Github PR or Issue.
Usage
First step is generate a new Github token in Github Settings.
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.3 -i 1 -r miry/prcomment Hello
Crystal
export GITHUB_TOKEN=<personal token>
crystal run src/cli.cr -- -i 1 -r miry/prcomment Hello
GithubAction
Inputs
msg
Required The msg of the comment. Default "World".
pr
Optional The PR or Issue ID where to add a comment. Default github.event.pull_request.number.
match
Optional Pattern of the comment to be replaced with. Default ""
Examples
steps:
-
uses: miry/prcomment@v0.1.3
if: github.event_name == 'pull_request'
name: Comment
with:
msg: "Testing simple message from job ${{ github.run_id }}!"
match: 'Testing simple message from job .*'
pr: ${{ github.event.pull_request.number }}
token: ${{ secrets.GITHUB_TOKEN }}
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:'
The comment is too big for single line:
echo "The big content could be piped\nSome pattern from the comment\nThird line" | \
crystal run src/cli.cr -- -i 1 -r miry/prcomment -m "Some pattern from the comment"
Documentation
Built from the current release. The first visit to a release nobody has asked for starts its build.
Links
This release
- Version
0.1.2- Tagged
- Mar 10, 2024
- Commit
7906664d9314- Indexed
- not yet
Dependents
No indexed shard depends on this one yet.
Repository
github.com/miry/prcomment
Metadata
- Created
- Aug 12, 2026
- Updated
- Aug 15, 2026
- Synced
- Aug 15, 2026
- Versions
- 4