Skip to content

Commit

Permalink
First syntax/lint issues
Browse files Browse the repository at this point in the history
  • Loading branch information
Oded-B committed Jun 19, 2024
1 parent da81065 commit a2e7144
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 20 deletions.
10 changes: 1 addition & 9 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,9 @@ go 1.22

toolchain go1.22.1

require (
github.com/alexliesenfeld/health v0.8.0

require github.com/alexliesenfeld/health v0.8.0

require (
=======
github.com/argoproj/argo-cd/v2 v2.11.2
github.com/argoproj/gitops-engine v0.7.1-0.20240416142647-fbecbb86e412
github.com/bradleyfalzon/ghinstallation/v2 v2.10.0
Expand Down Expand Up @@ -47,7 +44,6 @@ require (
github.com/alecthomas/participle/v2 v2.1.1 // indirect
github.com/argoproj/pkg v0.13.7-0.20230626144333-d56162821bd1 // indirect
github.com/beorn7/perks v1.0.1 // indirect

github.com/blang/semver/v4 v4.0.0 // indirect
github.com/bmatcuk/doublestar/v4 v4.6.1 // indirect
github.com/bombsimon/logrusr/v2 v2.0.1 // indirect
Expand Down Expand Up @@ -85,7 +81,6 @@ require (
github.com/goccy/go-yaml v1.11.3 // indirect
github.com/gogo/protobuf v1.3.2 // indirect
github.com/golang-jwt/jwt/v4 v4.5.0 // indirect

github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
github.com/golang/protobuf v1.5.4 // indirect
github.com/google/btree v1.1.2 // indirect
Expand All @@ -109,7 +104,6 @@ require (
github.com/itchyny/timefmt-go v0.1.5 // indirect
github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 // indirect
github.com/jinzhu/copier v0.4.0 // indirect

github.com/jonboulle/clockwork v0.4.0 // indirect
github.com/josharian/intern v1.0.0 // indirect
github.com/json-iterator/go v1.1.12 // indirect
Expand All @@ -121,7 +115,6 @@ require (
github.com/mailru/easyjson v0.7.7 // indirect
github.com/mattn/go-colorable v0.1.13 // indirect
github.com/mattn/go-isatty v0.0.20 // indirect

github.com/mitchellh/go-wordwrap v1.0.1 // indirect
github.com/moby/spdystream v0.2.0 // indirect
github.com/moby/term v0.5.0 // indirect
Expand Down Expand Up @@ -155,7 +148,6 @@ require (
github.com/xanzy/ssh-agent v0.3.3 // indirect
github.com/xlab/treeprint v1.2.0 // indirect
github.com/yuin/gopher-lua v1.1.1 // indirect

go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.50.0 // indirect
go.opentelemetry.io/otel v1.25.0 // indirect
go.opentelemetry.io/otel/metric v1.25.0 // indirect
Expand Down
19 changes: 9 additions & 10 deletions internal/pkg/configuration/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,16 +37,15 @@ type Config struct {

// Generic configuration

PromtionPrLables []string `yaml:"promtionPRlables"`
DryRunMode bool `yaml:"dryRunMode"`
AutoApprovePromotionPrs bool `yaml:"autoApprovePromotionPrs"`
ToggleCommitStatus map[string]string `yaml:"toggleCommitStatus"`
WebhookEndpointRegexs []WebhookEndpointRegex `yaml:"webhookEndpointRegexs"`
WhProxtSkipTLSVerifyUpstream bool `yaml:"whProxtSkipTLSVerifyUpstream"`
CommentArgocdDiffonPR bool `yaml:"commentArgocdDiffonPR"`
AutoMergeNoDiffPRs bool `yaml:"autoMergeNoDiffPRs"`
UseSHALabelForArgoDicovery bool `yaml:"useSHALabelForArgoDicovery"`

PromtionPrLables []string `yaml:"promtionPRlables"`
DryRunMode bool `yaml:"dryRunMode"`
AutoApprovePromotionPrs bool `yaml:"autoApprovePromotionPrs"`
ToggleCommitStatus map[string]string `yaml:"toggleCommitStatus"`
WebhookEndpointRegexs []WebhookEndpointRegex `yaml:"webhookEndpointRegexs"`
WhProxtSkipTLSVerifyUpstream bool `yaml:"whProxtSkipTLSVerifyUpstream"`
CommentArgocdDiffonPR bool `yaml:"commentArgocdDiffonPR"`
AutoMergeNoDiffPRs bool `yaml:"autoMergeNoDiffPRs"`
UseSHALabelForArgoDicovery bool `yaml:"useSHALabelForArgoDicovery"`
}

func ParseConfigFromYaml(y string) (*Config, error) {
Expand Down
1 change: 0 additions & 1 deletion internal/pkg/githubapi/promotion.go
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,6 @@ func getComponentConfig(ghPrClientDetails GhPrClientDetails, componentPath strin
return componentConfig, nil
}


// This function generates a list of "components" that where changed in the PR and are relevant for promotion)
func generateListOfRelevantComponents(ghPrClientDetails GhPrClientDetails, config *cfg.Config) (relevantComponents map[relevantComponent]struct{}, err error) {
relevantComponents = make(map[relevantComponent]struct{})
Expand Down

0 comments on commit a2e7144

Please sign in to comment.