diff --git a/internal/controllers/terraformpullrequest/comment/templates/comment.md b/internal/controllers/terraformpullrequest/comment/templates/comment.md index f2032438c..2de2429d2 100644 --- a/internal/controllers/terraformpullrequest/comment/templates/comment.md +++ b/internal/controllers/terraformpullrequest/comment/templates/comment.md @@ -2,7 +2,8 @@ {{ len .Layers }} layer(s) affected with {{ .Commit }} commit. -{{- range .Layers }} +{{ range .Layers }} + ### Layer {{ .Path }} `{{ .ShortDiff }}` @@ -14,4 +15,5 @@ {{ .PrettyPlan }} ``` -{{- end }} + +{{ end }} diff --git a/internal/controllers/terraformpullrequest/layer.go b/internal/controllers/terraformpullrequest/layer.go index 6e71c2f70..501038dbf 100644 --- a/internal/controllers/terraformpullrequest/layer.go +++ b/internal/controllers/terraformpullrequest/layer.go @@ -12,6 +12,7 @@ import ( configv1alpha1 "github.com/padok-team/burrito/api/v1alpha1" "github.com/padok-team/burrito/internal/annotations" controller "github.com/padok-team/burrito/internal/controllers/terraformlayer" + log "github.com/sirupsen/logrus" ) func (r *Reconciler) getAffectedLayers(repository *configv1alpha1.TerraformRepository, pr *configv1alpha1.TerraformPullRequest) ([]configv1alpha1.TerraformLayer, error) { @@ -115,6 +116,7 @@ func GetLinkedLayers(cl client.Client, pr *configv1alpha1.TerraformPullRequest) } func (r *Reconciler) deleteTempLayers(ctx context.Context, pr *configv1alpha1.TerraformPullRequest) error { + log.Infof("deleting temporary layers for pull request %s/%s", pr.Namespace, pr.Name) return r.Client.DeleteAllOf( ctx, &configv1alpha1.TerraformLayer{}, client.InNamespace(pr.Namespace), client.MatchingLabels{"burrito/managed-by": pr.Name}, )