From c176900bf555813f4124b0bf440281114bc3a2c4 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" Date: Mon, 10 Jun 2024 03:50:48 +0000 Subject: [PATCH] deploy: suzuki-shunsuke/github-comment-docs@3b36099287918d745e47bc5a8bef13c5911a10ed --- docs/404.html | 4 ++-- .../js/{runtime~main.e2fa00c8.js => runtime~main.f3e6b7f1.js} | 2 +- 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 ++-- 13 files changed, 25 insertions(+), 25 deletions(-) rename docs/assets/js/{runtime~main.e2fa00c8.js => runtime~main.f3e6b7f1.js} (86%) diff --git a/docs/404.html b/docs/404.html index ffd49223..da0db9c8 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.e2fa00c8.js b/docs/assets/js/runtime~main.f3e6b7f1.js similarity index 86% rename from docs/assets/js/runtime~main.e2fa00c8.js rename to docs/assets/js/runtime~main.f3e6b7f1.js index 31860864..1ab9bf3f 100644 --- a/docs/assets/js/runtime~main.e2fa00c8.js +++ b/docs/assets/js/runtime~main.f3e6b7f1.js @@ -1 +1 @@ -(()=>{"use strict";var e,t,r,a,o,n={},f={};function d(e){var t=f[e];if(void 0!==t)return t.exports;var r=f[e]={id:e,loaded:!1,exports:{}};return n[e].call(r.exports,r,r.exports,d),r.loaded=!0,r.exports}d.m=n,d.c=f,e=[],d.O=(t,r,a,o)=>{if(!r){var n=1/0;for(u=0;u=o)&&Object.keys(d.O).every((e=>d.O[e](r[i])))?r.splice(i--,1):(f=!1,o0&&e[u-1][2]>o;u--)e[u]=e[u-1];e[u]=[r,a,o]},d.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return d.d(t,{a:t}),t},r=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,d.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);d.r(o);var n={};t=t||[null,r({}),r([]),r(r)];for(var f=2&a&&e;"object"==typeof f&&!~t.indexOf(f);f=r(f))Object.getOwnPropertyNames(f).forEach((t=>n[t]=()=>e[t]));return n.default=()=>e,d.d(o,n),o},d.d=(e,t)=>{for(var r in t)d.o(t,r)&&!d.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},d.f={},d.e=e=>Promise.all(Object.keys(d.f).reduce(((t,r)=>(d.f[r](e,t),t)),[])),d.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:"e24d6448",259:"9cef4a00",265:"afe02de1",401:"1951ff7f",416:"dbf80d9f",429:"33abd244",462:"d7fd26d0",581:"aea8fd54",614:"7ec74a14",684:"84f80a5f",714:"f43334d1",722:"bce9a971",742:"decc292e",774:"002f7243",777:"48a5ca3f",895:"1dc7a974",913:"d0f07ca0",924:"b5ef9f37",950:"8922b658"}[e]+".js",d.miniCssF=e=>{},d.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),d.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),a={},o="github-comment:",d.l=(e,t,r,n)=>{if(a[e])a[e].push(t);else{var f,i;if(void 0!==r)for(var c=document.getElementsByTagName("script"),u=0;u{f.onerror=f.onload=null,clearTimeout(s);var o=a[e];if(delete a[e],f.parentNode&&f.parentNode.removeChild(f),o&&o.forEach((e=>e(r))),t)return t(r)},s=setTimeout(l.bind(null,void 0,{type:"timeout",target:f}),12e4);f.onerror=l.bind(null,f.onerror),f.onload=l.bind(null,f.onload),i&&document.head.appendChild(f)}},d.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},d.p="/github-comment/",d.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,d.p+d.u(e)},(()=>{var e={354:0,869:0};d.f.j=(t,r)=>{var a=d.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=d.p+d.u(t),f=new Error;d.l(n,(r=>{if(d.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;f.message="Loading chunk "+t+" failed.\n("+o+": "+n+")",f.name="ChunkLoadError",f.type=o,f.request=n,a[1](f)}}),"chunk-"+t,t)}},d.O.j=t=>0===e[t];var t=(t,r)=>{var a,o,n=r[0],f=r[1],i=r[2],c=0;if(n.some((t=>0!==e[t]))){for(a in f)d.o(f,a)&&(d.m[a]=f[a]);if(i)var u=i(d)}for(t&&t(r);c{"use strict";var e,t,r,a,o,n={},f={};function d(e){var t=f[e];if(void 0!==t)return t.exports;var r=f[e]={id:e,loaded:!1,exports:{}};return n[e].call(r.exports,r,r.exports,d),r.loaded=!0,r.exports}d.m=n,d.c=f,e=[],d.O=(t,r,a,o)=>{if(!r){var n=1/0;for(b=0;b=o)&&Object.keys(d.O).every((e=>d.O[e](r[i])))?r.splice(i--,1):(f=!1,o0&&e[b-1][2]>o;b--)e[b]=e[b-1];e[b]=[r,a,o]},d.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return d.d(t,{a:t}),t},r=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,d.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);d.r(o);var n={};t=t||[null,r({}),r([]),r(r)];for(var f=2&a&&e;"object"==typeof f&&!~t.indexOf(f);f=r(f))Object.getOwnPropertyNames(f).forEach((t=>n[t]=()=>e[t]));return n.default=()=>e,d.d(o,n),o},d.d=(e,t)=>{for(var r in t)d.o(t,r)&&!d.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},d.f={},d.e=e=>Promise.all(Object.keys(d.f).reduce(((t,r)=>(d.f[r](e,t),t)),[])),d.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:"e24d6448",259:"9cef4a00",265:"afe02de1",401:"1951ff7f",416:"dbf80d9f",429:"33abd244",462:"d7fd26d0",581:"aea8fd54",614:"7ec74a14",684:"84f80a5f",714:"f43334d1",722:"bce9a971",742:"decc292e",774:"002f7243",777:"48a5ca3f",895:"1dc7a974",913:"d0f07ca0",924:"b5ef9f37",950:"8922b658"}[e]+".js",d.miniCssF=e=>{},d.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),d.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),a={},o="github-comment:",d.l=(e,t,r,n)=>{if(a[e])a[e].push(t);else{var f,i;if(void 0!==r)for(var c=document.getElementsByTagName("script"),b=0;b{f.onerror=f.onload=null,clearTimeout(s);var o=a[e];if(delete a[e],f.parentNode&&f.parentNode.removeChild(f),o&&o.forEach((e=>e(r))),t)return t(r)},s=setTimeout(l.bind(null,void 0,{type:"timeout",target:f}),12e4);f.onerror=l.bind(null,f.onerror),f.onload=l.bind(null,f.onload),i&&document.head.appendChild(f)}},d.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},d.p="/github-comment/",d.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,d.p+d.u(e)},(()=>{var e={354:0,869:0};d.f.j=(t,r)=>{var a=d.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=d.p+d.u(t),f=new Error;d.l(n,(r=>{if(d.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;f.message="Loading chunk "+t+" failed.\n("+o+": "+n+")",f.name="ChunkLoadError",f.type=o,f.request=n,a[1](f)}}),"chunk-"+t,t)}},d.O.j=t=>0===e[t];var t=(t,r)=>{var a,o,n=r[0],f=r[1],i=r[2],c=0;if(n.some((t=>0!==e[t]))){for(a in f)d.o(f,a)&&(d.m[a]=f[a]);if(i)var b=i(d)}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 69ccfe9f..966b6d22 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 246959bc..7d9188f2 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 e673374d..7784dbda 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 da23fc05..105a0477 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 6a75d6ef..d12197f0 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 f0a732e7..406e0e27 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 582de93d..8afb57da 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 4e4ed13a..2b098aa2 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 2f8a0d59..aeb208de 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 186316ea..7ab97651 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