diff --git a/internal/pkg/githubapi/github.go b/internal/pkg/githubapi/github.go index b3dd3bc0..09d8d70e 100644 --- a/internal/pkg/githubapi/github.go +++ b/internal/pkg/githubapi/github.go @@ -32,7 +32,7 @@ const githubCommentMaxSize = 65536 type DiffCommentData struct { DiffOfChangedComponents []argocd.DiffResult - HasSyncableComponens bool + HasSyncableComponents bool BranchName string Header string } @@ -183,7 +183,7 @@ func HandlePREvent(eventPayload *github.PullRequestEvent, ghPrClientDetails GhPr for _, componentPath := range componentPathList { if isSyncFromBranchAllowedForThisPath(config.Argocd.AllowSyncfromBranchPathRegex, componentPath) { - diffCommentData.HasSyncableComponens = true + diffCommentData.HasSyncableComponents = true break } } diff --git a/internal/pkg/githubapi/testdata/diff_comment_data_test.json b/internal/pkg/githubapi/testdata/diff_comment_data_test.json index a67ece41..6e181fe5 100644 --- a/internal/pkg/githubapi/testdata/diff_comment_data_test.json +++ b/internal/pkg/githubapi/testdata/diff_comment_data_test.json @@ -74,7 +74,7 @@ "AppWasTemporarilyCreated": false } ], - "HasSyncableComponens": false, + "HasSyncableComponents": false, "BranchName": "promotions/284-simulate-error-5c159151017f", "Header": "" } diff --git a/templates/argoCD-diff-pr-comment-concise.gotmpl b/templates/argoCD-diff-pr-comment-concise.gotmpl index 4a9fc14a..af379a74 100644 --- a/templates/argoCD-diff-pr-comment-concise.gotmpl +++ b/templates/argoCD-diff-pr-comment-concise.gotmpl @@ -37,7 +37,7 @@ It will not be present in ArgoCD UI for more than a few seconds and it can not b {{- end }} -{{- if .HasSyncableComponens }} +{{- if .HasSyncableComponents }} - [ ] Set ArgoCD apps Target Revision to `{{ .BranchName }}` diff --git a/templates/argoCD-diff-pr-comment.gotmpl b/templates/argoCD-diff-pr-comment.gotmpl index 043bffca..6d7ff360 100644 --- a/templates/argoCD-diff-pr-comment.gotmpl +++ b/templates/argoCD-diff-pr-comment.gotmpl @@ -43,7 +43,7 @@ It will not be present in ArgoCD UI for more than a few seconds and it can not b {{- end }} -{{- if .HasSyncableComponens }} +{{- if .HasSyncableComponents }} - [ ] Set ArgoCD apps Target Revision to `{{ .BranchName }}`