Skip to content

Commit

Permalink
test: test to hide comments on GitHub Actions
Browse files Browse the repository at this point in the history
  • Loading branch information
suzuki-shunsuke committed Jan 15, 2021
1 parent b6754a5 commit 06b2131
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 0 deletions.
6 changes: 6 additions & 0 deletions .github-comment.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,16 @@
---
templates:
embed_template_key: '{{"<!-- github-comment:" | AvoidHTMLEscape}}{{.TemplateKey}}{{" -->" | AvoidHTMLEscape}}'
post:
default: |
CIRCLE_PULL_REQUEST: {{Env "CIRCLE_PULL_REQUEST"}}
hello:
template: |
$Hello: {{Env "HELLO"}} {{ "hello!" | upper | repeat 5 }}
{{template "embed_template_key" .}}
minimize: |
Comment.Body contains "<!-- github-comment:" + PostedComment.TemplateKey + " -->"
exec:
hello:
- when: ExitCode != 0
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,5 @@ jobs:
- run: go mod download
- name: dry run
run: bash scripts/test-dry-run.sh
- name: dry run
run: bash scripts/test-hide-comments.sh
7 changes: 7 additions & 0 deletions scripts/test-hide-comments.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/usr/bin/env bash

set -eux

cd "$(dirname "$0")/.."

go run ./cmd/github-comment --log-level debug post -k hello --org suzuki-shunsuke --repo issue --pr 66

0 comments on commit 06b2131

Please sign in to comment.