-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgithub-comment.yaml
33 lines (24 loc) · 1.03 KB
/
github-comment.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
# ref: https://github.com/suzuki-shunsuke/github-comment
hide:
default: |
Comment.HasMeta && Comment.Meta.SHA1 != Commit.SHA1 && ! (Comment.Meta.Program == "tfcmt" && Comment.Meta.Command == "apply")
post:
already-locked:
template: |
## :x: This target is being locked {{if .Vars.tfaction_target}}({{.Vars.tfaction_target}}){{end}}
{{template "link" .}}
Please wait until the lock is released.
Or if the lock wasn't released for any trouble, [you need to run the workflow to release the lock](https://github.com/suzuki-shunsuke/tfaction-example/actions/workflows/lock.yaml).
target: {{.Vars.tfaction_target}}
actor: {{.Vars.actor}}
datetime: {{.Vars.datetime}}
workflow_url: {{.Vars.workflow_url}}
message: {{.Vars.message}}
exec:
default:
- when: ExitCode != 0
template: |
## :x: Failed {{if .Vars.tfaction_target}}({{.Vars.tfaction_target}}){{end}}
{{template "link" .}}
{{template "join_command" .}}
{{template "hidden_combined_output" .}}