Skip to content

Commit

Permalink
fix diff order and update bot name
Browse files Browse the repository at this point in the history
Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
  • Loading branch information
crenshaw-dev committed Jun 3, 2024
1 parent bc11a49 commit d28b53f
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions controller/preview.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ import (
"time"
)

const ArgoCDGitHubUsername = "gitops-promoter[bot]"
const ArgoCDGitHubUsername = "gitops-promoter-5-29[bot]"
const PreviewSleepDuration = 10 * time.Second

type Previewer struct {
Expand Down Expand Up @@ -278,8 +278,8 @@ func (p *Previewer) makeComment(apps []*v1alpha1.Application, baseBranch string,
}
targetFile := path.Join(tempDir, "target.yaml")
targetData := []byte("")
if baseUnstructured != nil {
targetData, err = yaml.Marshal(baseUnstructured)
if headUnstructured != nil {
targetData, err = yaml.Marshal(headUnstructured)
if err != nil {
return "", fmt.Errorf("failed to marshal base unstructured: %w", err)
}
Expand All @@ -290,8 +290,8 @@ func (p *Previewer) makeComment(apps []*v1alpha1.Application, baseBranch string,
}
liveFile := path.Join(tempDir, "base.yaml")
liveData := []byte("")
if headUnstructured != nil {
liveData, err = yaml.Marshal(headUnstructured)
if baseUnstructured != nil {
liveData, err = yaml.Marshal(baseUnstructured)
if err != nil {
return "", fmt.Errorf("failed to marshal head unstructured: %w", err)
}
Expand Down

0 comments on commit d28b53f

Please sign in to comment.