Skip to content

Commit

Permalink
ensure that the app resolver returns unique values
Browse files Browse the repository at this point in the history
  • Loading branch information
corymurphy committed Oct 16, 2024
1 parent d1388a2 commit b094264
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
4 changes: 2 additions & 2 deletions charts/argobot/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@ apiVersion: v2
name: argobot
description: Helm chart for the corymurphy/argobot app
type: application
version: 0.16.3
appVersion: 0.16.3
version: 0.16.4
appVersion: 0.16.4
3 changes: 2 additions & 1 deletion pkg/events/application_resolver.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import (
"github.com/corymurphy/argobot/pkg/argocd"
"github.com/corymurphy/argobot/pkg/github"
"github.com/corymurphy/argobot/pkg/logging"
"github.com/corymurphy/argobot/pkg/utils"
gogithub "github.com/google/go-github/v53/github"
)

Expand Down Expand Up @@ -46,7 +47,7 @@ func (a *ApplicationResolver) FindApplicationNames(ctx context.Context, event gi
a.Log.Debug(fmt.Sprintf("name: %s | path: %s", name, path))

for _, file := range modified {
if strings.Contains(file, path) && app.Spec.Source.RepoURL == event.Repository.HtmlUrl() {
if !utils.StringInSlice(name, changedApps) && strings.Contains(file, path) && app.Spec.Source.RepoURL == event.Repository.HtmlUrl() {
changedApps = append(changedApps, name)
}
}
Expand Down
2 changes: 1 addition & 1 deletion version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.16.3
0.16.4

0 comments on commit b094264

Please sign in to comment.