Skip to content

Commit

Permalink
first try github-comment
Browse files Browse the repository at this point in the history
  • Loading branch information
RyosukeDTomita committed Jun 16, 2024
1 parent bb8e43b commit e37c3ee
Show file tree
Hide file tree
Showing 3 changed files with 85 additions and 0 deletions.
1 change: 1 addition & 0 deletions aqua.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,4 @@ registries:
ref: v4.193.0 # renovate: depName=aquaproj/aqua-registry
packages:
- name: suzuki-shunsuke/pinact@v0.2.0
- name: suzuki-shunsuke/github-comment@v6.0.4
26 changes: 26 additions & 0 deletions doc/tools_doc/github-comment.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# github-comment

## github-commentとは

> [作者さんのブログ](https://zenn.dev/shunsuke_suzuki/articles/improve-cicd-with-github-comment)
> [使い方](https://github.com/suzuki-shunsuke/github-comment?tab=readme-ov-file)
- CIの結果を見やすくするために整形してコメントに投稿できる。

## install

正直ローカルにいれるというよりはGitHub Actionsから実行するのが良さそうだが一応インストール手順を書いておく。

```shell
aqua g -i suzuki-shunsuke/github-comment
aqua i -l
```

## 使い方

ブランチがリモート(github.com)に存在しないとエラーが出る。

```shell
github-comment post -k test
opts is invalid: org is required
```
58 changes: 58 additions & 0 deletions github-comment.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
---
# skip_no_token: true
# base:
# org:
# repo:
# vars:
# foo: bar
# zoo:
# foo: hello
# templates:
# header: "# {{.Org}}/{{.Repo}}"
# post:
# default:
# template: |
# {{template "header" .}}
# {{.Vars.foo}} {{.Vars.zoo.foo}}
# {{.Org}} {{.Repo}} {{.PRNumber}} {{.SHA1}} {{.TemplateKey}}
# hello:
# template: hello
# exec:
# hello:
# - when: true
# template: |
# {{template "header" .}}
# {{.Vars.foo}} {{.Vars.zoo.foo}}
# {{.Org}} {{.Repo}} {{.PRNumber}} {{.SHA1}} {{.TemplateKey}}
# exit code: {{.ExitCode}}
#
# ```console
# $ {{.Command}}
# ```
#
# Stdout:
#
# ```
# {{.Stdout}}
# ```
#
# Stderr:
#
# ```
# {{.Stderr}}
# ```
#
# CombinedOutput:
#
# ```
# {{.CombinedOutput}}
# ```
# template_for_too_long: |
# {{template "header" .}}
# {{.Vars.foo}} {{.Vars.zoo.foo}}
# {{.Org}} {{.Repo}} {{.PRNumber}} {{.SHA1}} {{.TemplateKey}}
# exit code: {{.ExitCode}}
#
# ```console
# $ {{.Command}}
# ```

0 comments on commit e37c3ee

Please sign in to comment.