github-comment
github-comment is a CLI to create and hide GitHub comments by GitHub REST API.
$ github-comment post -k test
$ github-comment exec -- go test ./...
$ github-comment hide
Motivation
github-comment's motivation is to improve CI's user experience. Using github-comment, you can notify the result of CI and users can understand what the problem is and what they should do quickly.
It's bothersome to check CI log and investigate what command failed and why it failed. If you run a shell script, it may be difficult to understand what command failed.
Please see the following screenshot. ref
You would be able to understand the failed command and its log quickly.
You can also post a guide. ref
By the guide, users would be able to solve the problem by temselves. This improves the productivity of both Developer and DevOps Engineer.
github-comment also supports hiding old comments, which makes pull requests clean.
Features
- Easy to install
- github-comment is a single executable binary written in Go. No dependency is needed
- Post comments according to the result of command
- For example, you can post comment only when the command failed or the specific phrase is outputted
- Hide old comments conditionally
- Get CI information automatically from CI Environment variables
- Manage configuration with YAML
- You can separate CI script and github-comment configuration
- Provide built-in templates
Blog
Written in Japanese.
- 2021-12-28 github-comment で PR にコメントをして CI の結果を分かりやすくする
- 2020-07-31 github-comment - GitHub にコメントを投稿する CLI