yuyaban / gitlab-comment

About gitlab-comment is a CLI command to post Merge Request Note.
Other
14 stars 2 forks source link
devops gitlab gitlab-ci

gitlab-comment

Build Status Go Report Card GitHub last commit License

CLI to create GitLab Notes by GitLab REST API
Fork of suzuki-shunsuke/github-comment, supporting GitLab (dropped GitHub support).

Document

Prerequisites

Basic Comamnds are follows:

# post
github-comment post -k hello
# post: Enable updateCondition
github-comment post -k hello -u 'Comment.HasMeta && Comment.Meta.TemplateKey == "hello"' --var target:"${CI_JOB_NAME}"

# exec
github-comment exec -k hello -- echo "this is comment"
# exec: Enable updateCondition
github-comment exec -k hello -u 'Comment.HasMeta && Comment.Meta.TemplateKey == "hello"' --var target:"${CI_JOB_NAME}" -- echo "this is comment"

A concrete example of gitlab-comment configuration running on GitLab CI can be found in .gitlab-ci.yml.

And, See also the original documentation (suzuki-shunsuke/github-comment).

License

MIT