Discover Packages
github.com/yuyaban/gitlab-comment
module
Version:
v0.2.6
Opens a new window with list of versions in this module.
Published: May 22, 2024
License: MIT
Opens a new window with license information.
README
README
¶
CLI to create GitLab Notes by GitLab REST API
Fork of suzuki-shunsuke/github-comment , supporting GitLab (dropped GitHub support).
Document
Prerequisites
Create and store GitLab access token in project or group CI variables with key name GITLAB_TOKEN
or GITLAB_ACCESS_TOKEN
.
ref: Project access tokens | GitLab
When using the post command, a default template is not provided, so you must provide configuration file.
The configuration file name must be one of the following.
.gitlab-comment.yml (or gitlab-comment.yml)
.gitlab-comment.yaml (or gitlab-comment.yaml)
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
Expand ▾
Collapse ▴
Click to show internal directories.
Click to hide internal directories.