-
Notifications
You must be signed in to change notification settings - Fork 91
Open
Description
My issue:
Even though I set GITHUB_REF env var, I still get tfnotify comments attached to my commits instead of having them attached to related PR and what's more I do not get any labels attached to my PR.
My tfnotify.yml
ci: github-actions
notifier:
github:
token: <redacted>
repository:
owner: <redacted>
name: <redacted>
terraform:
plan:
template: |
{{ .Title }}
{{ .Message }}
{{if .Result}}
<pre><code>{{ .Result }}
</pre></code>
{{end}}
<details><summary>Details (Click me)</summary>
<pre><code>{{ .Body }}
</pre></code></details>
when_add_or_update_only:
label: "add-or-update"
when_no_changes:
label: "no-changes"
when_plan_error:
label: "error"
when_destroy:
label: "destroy"
template: |
## :warning: WARNING: Resource Deletion will happen :warning:
This plan contains **resource deletion**. Please check the plan result very carefully!
The command I run as part of my local tests:
export GITHUB_REF=refs/pull/240/merge
cat plan_result.temp | tfnotify --config tfnotify.yml plan --message "example tfnotify comment message"
I have a feeling tfnotify does not respect the GITHUB_REF env var I set and hence this code does not get executed.
Metadata
Metadata
Assignees
Labels
No labels