CLI to create and hide GitHub comments
MIT License
Bot releases are visible (Hide)
Published by suzuki-shunsuke almost 4 years ago
https://github.com/suzuki-shunsuke/github-comment/compare/v2.1.0-4...v2.1.0-5
milestone
#200 fix: rename "minimize" to "hide_old_comment"
Published by suzuki-shunsuke almost 4 years ago
https://github.com/suzuki-shunsuke/github-comment/compare/v2.1.0-3...v2.1.0-4
milestone
#199 fix: ignore error to get an authenticated user
Published by suzuki-shunsuke almost 4 years ago
https://github.com/suzuki-shunsuke/github-comment/compare/v2.1.0-2...v2.1.0-3
milestone
#196 fix: post a comment even if it failed to list hidden comments
#198 fix: don't filter commits by login when login is empty
Published by suzuki-shunsuke almost 4 years ago
https://github.com/suzuki-shunsuke/github-comment/compare/v2.1.0-1...v2.1.0-2
milestone
#195 fix(exec): set template key
Published by suzuki-shunsuke almost 4 years ago
https://github.com/suzuki-shunsuke/github-comment/compare/v2.1.0-0...v2.1.0-1
milestone
#193 fix: support to hide pull request comments
Published by suzuki-shunsuke almost 4 years ago
https://github.com/suzuki-shunsuke/github-comment/compare/v2.0.1...v2.1.0-0
milestone
#187 #189 feat: support to hide existing comments
#190 feat: support --log-level
option and structured logging with logrus
When github-comment is used at CI, github-comment posts a comment at every builds.
So many same comments would be posted.
Sometimes old comments are noisy, so we want to hide them.
By configuring minimize
, we can hide existing comments.
minimize
is an expr expression, and comments which match this condition would be hidden.
post:
foo:
template: foo
minimize: Comment.Body contains "foo" # minimize existing comments which includes `foo`
exec:
foo:
- when: ExitCode != 0
template: foo
minimize: Comment.Body contains "foo" # minimize existing comments which includes `foo`
If minimize
isn't set, no comment is hidden.
Wa can use HTML comment to hide comments.
post:
foo:
template: |
{{"<!-- github-comment:foo-" | AvoidHTMLEscape}}{{env "TARGET"}}{{" -->" | AvoidHTMLEscape}}
foo {{env "TARGET"}}
minimize: |
Comment.Body contains "<!-- github-comment:foo-" + Env("TARGET") + " -->"
In case of post
command, we can use the following variables in minimize
.
In addition to above variables, we can use the following variables in case of exec
command.
Published by suzuki-shunsuke almost 4 years ago
https://github.com/suzuki-shunsuke/github-comment/compare/v2.0.0...v2.0.1
milestone
#182 #183 fix: fix builtin template join_command and hidden_combined_output
Thanks to @yuya-takeyama #182
If the content of .CombinedOutput is Markdown-like,
it will be parsed as markdown and the posted comment will be ugly.
If .JoinCommand
includes ```,
<pre><code>$ {{.JoinCommand | AvoidHTMLEscape}}</pre></code>
Otherwise,
If .CombinedOutput
includes ``` ,
<details><pre><code>{{.CombinedOutput | AvoidHTMLEscape}}</code></pre></details>
Otherwise,
Published by suzuki-shunsuke almost 4 years ago
2c66d90 build: update version to v2.0.1-0
Published by suzuki-shunsuke almost 4 years ago
https://github.com/suzuki-shunsuke/github-comment/compare/v1.14.2...v2.0.0
milestone
#169 #170 fix: add the option -stdin-template
to post command
-stdin-template
echo hello | github-comment post
From v2.0.0, in case of the above command, the standard input will be ignored and the default
template will be used.
echo hello | github-comment post -stdin-template
Published by suzuki-shunsuke almost 4 years ago
https://github.com/suzuki-shunsuke/github-comment/compare/v1.14.1...v1.14.2
milestone
#160 #161 fix: the exit code of github-comment exec
is different from the exit code of executed command
Published by suzuki-shunsuke almost 4 years ago
https://github.com/suzuki-shunsuke/github-comment/compare/v1.14.0...v1.14.1
milestone
#156 fix: define the template "link" always
Published by suzuki-shunsuke almost 4 years ago
https://github.com/suzuki-shunsuke/github-comment/compare/v1.13.0...v1.14.0
milestone
#154 #155 feat: add default templates
Published by suzuki-shunsuke almost 4 years ago
b985d55 build: update version to v1.14.0-0
Published by suzuki-shunsuke almost 4 years ago
https://github.com/suzuki-shunsuke/github-comment/compare/v1.12.1...v1.13.0
milestone
#149 feat: add a template function AvoidHTMLEscape
Published by suzuki-shunsuke almost 4 years ago
5a7a150 build: update version to v1.13.0-0
Published by suzuki-shunsuke almost 4 years ago
https://github.com/suzuki-shunsuke/github-comment/compare/v1.12.0...v1.12.1
milestone
#147 fix: don't call fmt.Errorf if err is nil
Published by suzuki-shunsuke almost 4 years ago
https://github.com/suzuki-shunsuke/github-comment/compare/v1.11.2...v1.12.0
milestone
#143 #144 feat: support to skip comment
Published by suzuki-shunsuke about 4 years ago
https://github.com/suzuki-shunsuke/github-comment/compare/v1.11.1...v1.11.2
milestone
#141 fix: fix unmarshaling of PostConfig
Published by suzuki-shunsuke about 4 years ago
https://github.com/suzuki-shunsuke/github-comment/compare/v1.11.0...v1.11.1
Milestone
#130 chore(deps): update module masterminds/sprig to v3
Published by suzuki-shunsuke about 4 years ago
https://github.com/suzuki-shunsuke/github-comment/compare/v1.10.0...v1.11.0
Milestone
#129 feat: add sprig as template functions
#131 fix: remove debug log
#132 feat: add the silent option