From 4b1a0b5be6f567945d2efa2820f5357adf514d86 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" Date: Mon, 18 Mar 2024 04:05:46 +0000 Subject: [PATCH] deploy: suzuki-shunsuke/github-comment-docs@7d6096e232c296e5ab902d79221241c8ccb8f2ed --- docs/404.html | 4 ++-- docs/assets/js/runtime~main.0c96fcf4.js | 1 + docs/assets/js/runtime~main.23130fea.js | 1 - docs/builtin-template/index.html | 4 ++-- docs/complement/index.html | 4 ++-- docs/config/index.html | 4 ++-- docs/feature/index.html | 4 ++-- docs/getting-started/index.html | 4 ++-- docs/github-enterprise/index.html | 4 ++-- docs/hide/index.html | 4 ++-- docs/index.html | 4 ++-- docs/install/index.html | 4 ++-- docs/search/index.html | 4 ++-- docs/usage/index.html | 4 ++-- 14 files changed, 25 insertions(+), 25 deletions(-) create mode 100644 docs/assets/js/runtime~main.0c96fcf4.js delete mode 100644 docs/assets/js/runtime~main.23130fea.js diff --git a/docs/404.html b/docs/404.html index 4e18770e..e08ceb2d 100644 --- a/docs/404.html +++ b/docs/404.html @@ -4,13 +4,13 @@ Page Not Found | github-comment - +
Skip to main content

Page Not Found

We could not find what you were looking for.

Please contact the owner of the site that linked you to the original URL and let them know their link is broken.

- + \ No newline at end of file diff --git a/docs/assets/js/runtime~main.0c96fcf4.js b/docs/assets/js/runtime~main.0c96fcf4.js new file mode 100644 index 00000000..2bde87aa --- /dev/null +++ b/docs/assets/js/runtime~main.0c96fcf4.js @@ -0,0 +1 @@ +(()=>{"use strict";var e,t,r,a,o,n={},d={};function f(e){var t=d[e];if(void 0!==t)return t.exports;var r=d[e]={id:e,loaded:!1,exports:{}};return n[e].call(r.exports,r,r.exports,f),r.loaded=!0,r.exports}f.m=n,f.c=d,e=[],f.O=(t,r,a,o)=>{if(!r){var n=1/0;for(b=0;b=o)&&Object.keys(f.O).every((e=>f.O[e](r[i])))?r.splice(i--,1):(d=!1,o0&&e[b-1][2]>o;b--)e[b]=e[b-1];e[b]=[r,a,o]},f.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return f.d(t,{a:t}),t},r=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,f.t=function(e,a){if(1&a&&(e=this(e)),8&a)return e;if("object"==typeof e&&e){if(4&a&&e.__esModule)return e;if(16&a&&"function"==typeof e.then)return e}var o=Object.create(null);f.r(o);var n={};t=t||[null,r({}),r([]),r(r)];for(var d=2&a&&e;"object"==typeof d&&!~t.indexOf(d);d=r(d))Object.getOwnPropertyNames(d).forEach((t=>n[t]=()=>e[t]));return n.default=()=>e,f.d(o,n),o},f.d=(e,t)=>{for(var r in t)f.o(t,r)&&!f.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},f.f={},f.e=e=>Promise.all(Object.keys(f.f).reduce(((t,r)=>(f.f[r](e,t),t)),[])),f.u=e=>"assets/js/"+({82:"9f0307ff",138:"1a4e3797",259:"125efe5c",265:"a6a06bdd",401:"17896441",429:"e5bd44ea",581:"935f2afb",614:"576fb8c2",684:"2da2e04c",714:"1be78505",722:"6476eba6",742:"c377a04b",777:"c4de80f8",895:"b81c6bfd",924:"d589d3a7",950:"9225b3a9"}[e]||e)+"."+{82:"965fa52e",138:"56245f30",259:"9cef4a00",265:"afe02de1",401:"1951ff7f",416:"dbf80d9f",429:"33abd244",462:"4394d39b",581:"aea8fd54",614:"7ec74a14",684:"84f80a5f",714:"f43334d1",722:"bce9a971",742:"decc292e",774:"002f7243",777:"48a5ca3f",895:"1dc7a974",913:"d0f07ca0",924:"b5ef9f37",950:"a4d87fb3"}[e]+".js",f.miniCssF=e=>{},f.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),f.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),a={},o="github-comment:",f.l=(e,t,r,n)=>{if(a[e])a[e].push(t);else{var d,i;if(void 0!==r)for(var c=document.getElementsByTagName("script"),b=0;b{d.onerror=d.onload=null,clearTimeout(s);var o=a[e];if(delete a[e],d.parentNode&&d.parentNode.removeChild(d),o&&o.forEach((e=>e(r))),t)return t(r)},s=setTimeout(l.bind(null,void 0,{type:"timeout",target:d}),12e4);d.onerror=l.bind(null,d.onerror),d.onload=l.bind(null,d.onload),i&&document.head.appendChild(d)}},f.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},f.p="/github-comment/",f.gca=function(e){return e={17896441:"401","9f0307ff":"82","1a4e3797":"138","125efe5c":"259",a6a06bdd:"265",e5bd44ea:"429","935f2afb":"581","576fb8c2":"614","2da2e04c":"684","1be78505":"714","6476eba6":"722",c377a04b:"742",c4de80f8:"777",b81c6bfd:"895",d589d3a7:"924","9225b3a9":"950"}[e]||e,f.p+f.u(e)},(()=>{var e={354:0,869:0};f.f.j=(t,r)=>{var a=f.o(e,t)?e[t]:void 0;if(0!==a)if(a)r.push(a[2]);else if(/^(354|869)$/.test(t))e[t]=0;else{var o=new Promise(((r,o)=>a=e[t]=[r,o]));r.push(a[2]=o);var n=f.p+f.u(t),d=new Error;f.l(n,(r=>{if(f.o(e,t)&&(0!==(a=e[t])&&(e[t]=void 0),a)){var o=r&&("load"===r.type?"missing":r.type),n=r&&r.target&&r.target.src;d.message="Loading chunk "+t+" failed.\n("+o+": "+n+")",d.name="ChunkLoadError",d.type=o,d.request=n,a[1](d)}}),"chunk-"+t,t)}},f.O.j=t=>0===e[t];var t=(t,r)=>{var a,o,n=r[0],d=r[1],i=r[2],c=0;if(n.some((t=>0!==e[t]))){for(a in d)f.o(d,a)&&(f.m[a]=d[a]);if(i)var b=i(f)}for(t&&t(r);c{"use strict";var e,t,r,o,a,n={},d={};function i(e){var t=d[e];if(void 0!==t)return t.exports;var r=d[e]={id:e,loaded:!1,exports:{}};return n[e].call(r.exports,r,r.exports,i),r.loaded=!0,r.exports}i.m=n,i.c=d,e=[],i.O=(t,r,o,a)=>{if(!r){var n=1/0;for(b=0;b=a)&&Object.keys(i.O).every((e=>i.O[e](r[f])))?r.splice(f--,1):(d=!1,a0&&e[b-1][2]>a;b--)e[b]=e[b-1];e[b]=[r,o,a]},i.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return i.d(t,{a:t}),t},r=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,i.t=function(e,o){if(1&o&&(e=this(e)),8&o)return e;if("object"==typeof e&&e){if(4&o&&e.__esModule)return e;if(16&o&&"function"==typeof e.then)return e}var a=Object.create(null);i.r(a);var n={};t=t||[null,r({}),r([]),r(r)];for(var d=2&o&&e;"object"==typeof d&&!~t.indexOf(d);d=r(d))Object.getOwnPropertyNames(d).forEach((t=>n[t]=()=>e[t]));return n.default=()=>e,i.d(a,n),a},i.d=(e,t)=>{for(var r in t)i.o(t,r)&&!i.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},i.f={},i.e=e=>Promise.all(Object.keys(i.f).reduce(((t,r)=>(i.f[r](e,t),t)),[])),i.u=e=>"assets/js/"+({82:"9f0307ff",138:"1a4e3797",259:"125efe5c",265:"a6a06bdd",401:"17896441",429:"e5bd44ea",581:"935f2afb",614:"576fb8c2",684:"2da2e04c",714:"1be78505",722:"6476eba6",742:"c377a04b",777:"c4de80f8",895:"b81c6bfd",924:"d589d3a7",950:"9225b3a9"}[e]||e)+"."+{82:"965fa52e",138:"56245f30",259:"9cef4a00",265:"afe02de1",401:"1951ff7f",416:"dbf80d9f",429:"33abd244",462:"4394d39b",581:"aea8fd54",614:"7ec74a14",684:"84f80a5f",714:"f43334d1",722:"bce9a971",742:"decc292e",774:"002f7243",777:"48a5ca3f",895:"1dc7a974",913:"d0f07ca0",924:"b5ef9f37",950:"a4d87fb3"}[e]+".js",i.miniCssF=e=>{},i.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),i.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),o={},a="github-comment:",i.l=(e,t,r,n)=>{if(o[e])o[e].push(t);else{var d,f;if(void 0!==r)for(var c=document.getElementsByTagName("script"),b=0;b{d.onerror=d.onload=null,clearTimeout(s);var a=o[e];if(delete o[e],d.parentNode&&d.parentNode.removeChild(d),a&&a.forEach((e=>e(r))),t)return t(r)},s=setTimeout(l.bind(null,void 0,{type:"timeout",target:d}),12e4);d.onerror=l.bind(null,d.onerror),d.onload=l.bind(null,d.onload),f&&document.head.appendChild(d)}},i.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.p="/github-comment/",i.gca=function(e){return e={17896441:"401","9f0307ff":"82","1a4e3797":"138","125efe5c":"259",a6a06bdd:"265",e5bd44ea:"429","935f2afb":"581","576fb8c2":"614","2da2e04c":"684","1be78505":"714","6476eba6":"722",c377a04b:"742",c4de80f8:"777",b81c6bfd:"895",d589d3a7:"924","9225b3a9":"950"}[e]||e,i.p+i.u(e)},(()=>{var e={354:0,869:0};i.f.j=(t,r)=>{var o=i.o(e,t)?e[t]:void 0;if(0!==o)if(o)r.push(o[2]);else if(/^(354|869)$/.test(t))e[t]=0;else{var a=new Promise(((r,a)=>o=e[t]=[r,a]));r.push(o[2]=a);var n=i.p+i.u(t),d=new Error;i.l(n,(r=>{if(i.o(e,t)&&(0!==(o=e[t])&&(e[t]=void 0),o)){var a=r&&("load"===r.type?"missing":r.type),n=r&&r.target&&r.target.src;d.message="Loading chunk "+t+" failed.\n("+a+": "+n+")",d.name="ChunkLoadError",d.type=a,d.request=n,o[1](d)}}),"chunk-"+t,t)}},i.O.j=t=>0===e[t];var t=(t,r)=>{var o,a,n=r[0],d=r[1],f=r[2],c=0;if(n.some((t=>0!==e[t]))){for(o in d)i.o(d,o)&&(i.m[o]=d[o]);if(f)var b=f(i)}for(t&&t(r);c Builtin Templates | github-comment - +

Builtin Templates

Some default templates are provided. They are overwritten if the same name templates are defined in the configuration file.

status

Usage:

{{template "status" .}}

Content of the template:

:{{if eq .ExitCode 0}}white_check_mark{{else}}x{{end}}:

join_command

Usage:

{{template "join_command" .}}

Content of the template:

If .JoinCommand includes ```,

<pre><code>$ {{.JoinCommand | AvoidHTMLEscape}}</pre></code>

Otherwise,

```
$ {{.JoinCommand | AvoidHTMLEscape}}
```

hidden_combined_output

Usage:

{{template "hidden_combined_output" .}}

Content of the template:

If .CombinedOutput includes ``` ,

<details><pre><code>{{.CombinedOutput | AvoidHTMLEscape}}</code></pre></details>

Otherwise,

<details>
```
{{.CombinedOutput | AvoidHTMLEscape}}
```
</details>

Usage:

{{template "link" .}}

Content of the template:

link is different per CI service.

CircleCI

[workflow](https://circleci.com/workflow-run/{{env "CIRCLE_WORKFLOW_ID" }}) [job]({{env "CIRCLE_BUILD_URL"}}) (job: {{env "CIRCLE_JOB"}})

CodeBuild

[Build link]({{env "CODEBUILD_BUILD_URL"}})

Drone

[build]({{env "DRONE_BUILD_LINK"}}) [step]({{env "DRONE_BUILD_LINK"}}/{{env "DRONE_STAGE_NUMBER"}}/{{env "DRONE_STEP_NUMBER"}})

GitHub Actions

[Build link](https://github.com/{{env "GITHUB_REPOSITORY"}}/actions/runs/{{env "GITHUB_RUN_ID"}})

exec's default template

when: ExitCode != 0
template: |
{{template "status" .}} {{template "link" .}}

{{template "join_command" .}}

{{template "hidden_combined_output" .}}
- + \ No newline at end of file diff --git a/docs/complement/index.html b/docs/complement/index.html index 3b0123a8..c016b11d 100644 --- a/docs/complement/index.html +++ b/docs/complement/index.html @@ -4,14 +4,14 @@ Complement | github-comment - +

Complement

Complement options with Platform's built-in Environment variables

The following platforms are supported.

  • CircleCI
  • GitHub Actions
  • Drone
  • AWS CodeBuild
  • Google Cloud Build

To complement, suzuki-shunske/go-ci-env is used.

Google Cloud Build Support

#521, github-comment >= v4.4.0

Set the environment variable GOOGLE_CLOUD_BUILD.

GOOGLE_CLOUD_BUILD=true

Set the following environment variables using substitutions.

  • COMMIT_SHA
  • BUILD_ID
  • PROJECT_ID
  • _PR_NUMBER
  • _REGION

Specify the repository owner and name in github-comment.yaml.

e.g.

github-comment.yaml

base:
org: suzuki-shunsuke
repo: github-comment

Complement the pull request number from CI_INFO_PR_NUMBER

The environment variable CI_INFO_PR_NUMBER is set by ci-info by default. If the pull request number can't be gotten from platform's built-in environment variables but CI_INFO_PR_NUMBER is set, github-comment uses CI_INFO_PR_NUMBER.

Complement options with any environment variables

caution

This feature was removed from v5.0.0 for security reason.

- + \ No newline at end of file diff --git a/docs/config/index.html b/docs/config/index.html index f57c4cc0..c169415c 100644 --- a/docs/config/index.html +++ b/docs/config/index.html @@ -4,7 +4,7 @@ Configuration | github-comment - + @@ -16,7 +16,7 @@ When the evaluation result is false the element is ignored, and the first matching element is used. If dont_comment is true, the comment isn't created. If no element matches, the comment isn't created without error.

Define reusable template components

templates:
<template name>: <template content>
post:
default:
template: |
{{template "<template name>" .}} ...

Define variables

vars:
<variable name>: <variable value>
post:
default:
template: |
{{.Vars.<variable name>}} ...

The variable can be passed with the option -var <variable name>:<variable value> too.

e.g.

$ github-comment post -var name:foo

See also

- + \ No newline at end of file diff --git a/docs/feature/index.html b/docs/feature/index.html index f59bd8b3..82754de8 100644 --- a/docs/feature/index.html +++ b/docs/feature/index.html @@ -4,7 +4,7 @@ Feature | github-comment - + @@ -14,7 +14,7 @@ If the GitHub Access Token is set, this option is ignored. If the GitHub Access Token isn't set, this option works like --dry-run.

Skip to send a comment with Environment variable

https://github.com/suzuki-shunsuke/github-comment/issues/143

When you try to run shell scripts for CI on local for testing, in many case you don't want to send a comment. So github-comment supports to skip to send a comment with an environment variable.

Set the environment variable GITHUB_COMMENT_SKIP to true.

$ export GITHUB_COMMENT_SKIP=true
$ github-comment post -template test # Do nothing
$ github-comment exec -- echo hello # a command is run but a comment isn't sent
hello
- + \ No newline at end of file diff --git a/docs/getting-started/index.html b/docs/getting-started/index.html index f2551242..75b4db67 100644 --- a/docs/getting-started/index.html +++ b/docs/getting-started/index.html @@ -4,7 +4,7 @@ Getting Started | github-comment - + @@ -14,7 +14,7 @@ Instead of pull request, you can send a comment to a commit

$ github-comment post -org suzuki-shunsuke -repo github-comment -sha1 36b1ade9740768f3645c240d487b53bee9e42702 -template test

https://github.com/suzuki-shunsuke/github-comment/commit/36b1ade9740768f3645c240d487b53bee9e42702#commitcomment-37933181

comment-to-commit

The template is rendered with Go's text/template.

You can write the template in the configuration file.

github-comment.yaml

post:
default:
template: |
{{.Org}}/{{.Repo}} test
hello:
template: |
hello world

If the argument -template is given, the configuration file is ignored. You can define multiple templates in the configuration file and specify the template by the argument -template-key (-k).

$ github-comment post -k hello

If -template and -template-key aren't set, the template default is used.

exec

Let's add the following configuration in the configuration file.

exec:
hello:
- when: true
template: |
exit code: {{.ExitCode}}

```
$ {{.Command}}
```

Stdout:

```
{{.Stdout}}
```

Stderr:

```
{{.Stderr}}
```

CombinedOutput:

```
{{.CombinedOutput}}
```

Then run a command and send the result as a comment.

$ github-comment exec -org suzuki-shunsuke -repo github-comment -pr 1 -k hello -- bash -c "echo foo; echo bar >&2; echo zoo"
bar
foo
zoo

https://github.com/suzuki-shunsuke/github-comment/pull/1#issuecomment-601503124

exec-1

Let's send the comment only if the command failed. Update the above configuration.

exec:
hello:
- when: ExitCode != 0
template: |
...

Run the above command again, then the command wouldn't be created.

If the command failed, then the comment is created.

$ github-comment exec -org suzuki-shunsuke -repo github-comment -pr 1 -k hello -- curl -f https://github.com/suzuki-shunsuke/not_found
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
curl: (22) The requested URL returned error: 404 Not Found
exit status 22

https://github.com/suzuki-shunsuke/github-comment/pull/1#issuecomment-601505610

You can change the template by the command result.

exec:
hello:
- when: ExitCode != 0
template: |
command failed
- when: ExitCode == 0
template: |
command is succeeded

By dont_comment, you can define the condition which the message isn't created.

exec:
hello:
- when: ExitCode != 0
dont_comment: true
- when: true
template: |
Hello, world
- + \ No newline at end of file diff --git a/docs/github-enterprise/index.html b/docs/github-enterprise/index.html index c0879822..37c1608d 100644 --- a/docs/github-enterprise/index.html +++ b/docs/github-enterprise/index.html @@ -4,13 +4,13 @@ GitHub Enterprise Support | github-comment - +

GitHub Enterprise Support

⚠️ I (@suzuki-shunsuke) don't use GitHub Enterprise, so I can't confirm if github-comment works well for GitHub Enterprise.

github-comment >= v4.2.0

#462 #464

Please set the following fields in configuration file github-comment.yaml.

GitHub Enterprise Server

ghe_base_url: http(s)://<your_enterprise_hostname> # CHANGE
ghe_graphql_endpoint: http(s)://<your_enterprise_hostname>/api/graphql # CHANGE

See. https://docs.github.com/en/enterprise-server/graphql/guides/forming-calls-with-graphql#the-graphql-endpoint

GitHub Enterprise Cloud

ghe_base_url: https://api.github.com
ghe_graphql_endpoint: https://api.github.com/graphql

See. https://docs.github.com/en/enterprise-cloud@latest/graphql/guides/forming-calls-with-graphql#the-graphql-endpoint

- + \ No newline at end of file diff --git a/docs/hide/index.html b/docs/hide/index.html index 3eca7d7b..7ec502e6 100644 --- a/docs/hide/index.html +++ b/docs/hide/index.html @@ -4,7 +4,7 @@ Hide comments | github-comment - + @@ -14,7 +14,7 @@ You would like to hide outdated comments.

By the subcommand hide, you can hide outdated comments. From github-comment v3, github-comments injects meta data like SHA1 into comments as HTML comment.

e.g.

<!-- github-comment: {"JobID":"xxx","JobName":"plan","SHA1":"79acc0778da6660712a65fd41a48b72cb7ad16c0","TemplateKey":"default","Vars":{}} -->

The following meta data is injected.

  • JobName (support only some CI platform)
  • JobID (support only some CI platform)
  • WorkflowName (support only some CI platform)
  • TemplateKey
  • Vars
  • SHA1

From github-comment v4, only variables specified by embedded_var_names are embedded into the comment.

In hide command, github-comment does the following things.

  1. gets the list of pull request (issue) comments
  2. extracts the injected meta data from comments
  3. hide comments which match the expr expression

The following variable is passed to the expression.

  • Commit:
    • Org
    • Repo
    • PRNumber
    • SHA1
  • Comment
    • Body
    • HasMeta
    • Meta
      • SHA1
      • TemplateKey
      • Vars
  • HideKey
  • Vars
  • Env: func(string) string

The default condition is Comment.HasMeta && Comment.Meta.SHA1 != Commit.SHA1. you can configure the condition in the configuration file.

hide:
default: "true"
hello: 'Comment.HasMeta && (Comment.Meta.SHA1 != Commit.SHA1 && Comment.Meta.Vars.target == "hello")'

you can specify the template with --hide-key (-k) option.

$ github-comment hide -k hello

If the template isn't specified, the template default is used.

you can specify the condition with -condition option.

$ github-comment hide -condition 'Comment.Body contains "foo"'
- + \ No newline at end of file diff --git a/docs/index.html b/docs/index.html index faa759d1..631374fa 100644 --- a/docs/index.html +++ b/docs/index.html @@ -4,7 +4,7 @@ github-comment | github-comment - + @@ -17,7 +17,7 @@ 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

- + \ No newline at end of file diff --git a/docs/install/index.html b/docs/install/index.html index 231e67db..303a42af 100644 --- a/docs/install/index.html +++ b/docs/install/index.html @@ -4,13 +4,13 @@ Install | github-comment - +
- + \ No newline at end of file diff --git a/docs/search/index.html b/docs/search/index.html index 727bdd87..e4f6a034 100644 --- a/docs/search/index.html +++ b/docs/search/index.html @@ -4,13 +4,13 @@ Search the documentation | github-comment - +

Search the documentation

- + \ No newline at end of file diff --git a/docs/usage/index.html b/docs/usage/index.html index 190608ff..ee1b6f34 100644 --- a/docs/usage/index.html +++ b/docs/usage/index.html @@ -4,13 +4,13 @@ Usage | github-comment - +

Usage

$ github-comment help
NAME:
github-comment - post a comment to GitHub

USAGE:
github-comment [global options] command [command options] [arguments...]

VERSION:
3.1.0

COMMANDS:
post post a comment
exec execute a command and post the result as a comment
init scaffold a configuration file if it doesn't exist
hide hide issue or pull request comments
help, h Shows a list of commands or help for one command

GLOBAL OPTIONS:
--log-level value log level [$GITHUB_COMMENT_LOG_LEVEL]
--help, -h show help (default: false)
--version, -v print the version (default: false)

post

$ github-comment help post
NAME:
github-comment post - post a comment

USAGE:
github-comment post [command options] [arguments...]

OPTIONS:
--org value GitHub organization name
--repo value GitHub repository name
--token value GitHub API token [$GITHUB_TOKEN, $GITHUB_ACCESS_TOKEN]
--sha1 value commit sha1
--template value comment template
--template-key value, -k value comment template key (default: "default")
--config value configuration file path
--pr value GitHub pull request number (default: 0)
--var value template variable
--var-file value template variable name and file path
--dry-run output a comment to standard error output instead of posting to GitHub (default: false)
--skip-no-token, -n works like dry-run if the GitHub Access Token isn't set (default: false) [$GITHUB_COMMENT_SKIP_NO_TOKEN]
--silent, -s suppress the output of dry-run and skip-no-token (default: false)
--stdin-template read standard input as the template (default: false)

exec

$ github-comment help exec
NAME:
github-comment exec - execute a command and post the result as a comment

USAGE:
github-comment exec [command options] [arguments...]

OPTIONS:
--org value GitHub organization name
--repo value GitHub repository name
--token value GitHub API token [$GITHUB_TOKEN, $GITHUB_ACCESS_TOKEN]
--sha1 value commit sha1
--template value comment template
--template-key value, -k value comment template key (default: "default")
--config value configuration file path
--pr value GitHub pull request number (default: 0)
--var value template variable
--var-file value template variable name and file path
--dry-run output a comment to standard error output instead of posting to GitHub (default: false)
--skip-no-token, -n works like dry-run if the GitHub Access Token isn't set (default: false) [$GITHUB_COMMENT_SKIP_NO_TOKEN]
--silent, -s suppress the output of dry-run and skip-no-token (default: false)

hide

$ github-comment help hide
NAME:
github-comment hide - hide issue or pull request comments

USAGE:
github-comment hide [command options] [arguments...]

OPTIONS:
--org value GitHub organization name
--repo value GitHub repository name
--token value GitHub API token [$GITHUB_TOKEN, $GITHUB_ACCESS_TOKEN]
--config value configuration file path
--condition value hide condition
--hide-key value, -k value hide condition key (default: "default")
--pr value GitHub pull request number (default: 0)
--sha1 value commit sha1
--var value template variable
--dry-run output a comment to standard error output instead of posting to GitHub (default: false)
--skip-no-token, -n works like dry-run if the GitHub Access Token isn't set (default: false) [$GITHUB_COMMENT_SKIP_NO_TOKEN]
--silent, -s suppress the output of dry-run and skip-no-token (default: false)
- + \ No newline at end of file