Skip to main content

github-comment

Build Status Go Report Card GitHub last commit License

github-comment is a CLI to create and hide GitHub comments by GitHub REST API.

$ github-comment post -k test

post-test

$ github-comment exec -- go test ./...

exec-go-test

$ github-comment hide

image

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.

image

You can also post a guide. ref

image

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.

Release Notes

GitHub Releases