Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: avoid generating many github comments on plan, apply #4586

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion server/events/templates/multi_project_apply.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,10 @@
{{ template "multiProjectHeader" . -}}
{{ range $i, $result := .Results -}}
### {{ add $i 1 }}. {{ if $result.ProjectName }}project: `{{ $result.ProjectName }}` {{ end }}dir: `{{ $result.RepoRelDir }}` workspace: `{{ $result.Workspace }}`
{{ $result.Rendered }}
{{ if (le (len $result.Rendered) 500000) }}{{$result.Rendered}}{{ else }}[..]
{{trunc -100 $result.Rendered}}

:warning: The apply summary is large to render; open the atlantis job page.{{ end }}

---
{{ end -}}
Expand Down
4 changes: 3 additions & 1 deletion server/events/templates/multi_project_plan.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,10 @@
{{ range $i, $result := .Results -}}
{{ if (and $hideUnchangedPlans $result.NoChanges) }}{{continue}}{{end -}}
### {{ add $i 1 }}. {{ if $result.ProjectName }}project: `{{ $result.ProjectName }}` {{ end }}dir: `{{ $result.RepoRelDir }}` workspace: `{{ $result.Workspace }}`
{{ $result.Rendered }}
{{ if (le (len $result.Rendered) 500000) }}{{$result.Rendered}}{{ else }}[..]
{{trunc -100 $result.Rendered}}

:warning: The plan is too large to render; run `terraform plan` locally, or open the atlantis job page.{{ end }}
---
{{ end -}}
{{ template "multiProjectPlanFooter" . -}}
Expand Down
5 changes: 4 additions & 1 deletion server/events/templates/single_project_apply.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
{{ $result := index .Results 0 -}}
Ran {{ .Command }} for {{ if $result.ProjectName }}project: `{{ $result.ProjectName }}` {{ end }}dir: `{{ $result.RepoRelDir }}` workspace: `{{ $result.Workspace }}`

{{ $result.Rendered }}
{{ if (le (len $result.Rendered) 500000) }}{{$result.Rendered}}{{ else }}[..]
{{trunc -100 $result.Rendered}}

:warning: The apply summary is large to render; open the atlantis job page.{{ end }}
{{ template "log" . -}}
{{ end -}}
5 changes: 4 additions & 1 deletion server/events/templates/single_project_plan_success.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,10 @@
{{ $result := index .Results 0 -}}
Ran {{ .Command }} for {{ if $result.ProjectName }}project: `{{ $result.ProjectName }}` {{ end }}dir: `{{ $result.RepoRelDir }}` workspace: `{{ $result.Workspace }}`

{{ $result.Rendered }}
{{ if (le (len $result.Rendered) 500000) }}{{$result.Rendered}}{{ else }}[..]
{{trunc -100 $result.Rendered}}

:warning: The plan is too large to render; run `terraform plan` locally, or open the atlantis job page.{{ end }}
{{ if ne .DisableApplyAll true }}
---
* :fast_forward: To **apply** all unapplied plans from this {{ .VcsRequestType }}, comment:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
{{ $result := index .Results 0 -}}
Ran {{ .Command }} for dir: `{{ $result.RepoRelDir }}` workspace: `{{ $result.Workspace }}`

{{ $result.Rendered }}
{{ if (le (len $result.Rendered) 500000) }}{{$result.Rendered}}{{ else }}[..]
{{trunc -100 $result.Rendered}}

:warning: The plan is too large to render; run `terraform plan` locally, or open the atlantis job page.{{ end }}
{{ template "log" . -}}
{{ end -}}