From 05c9465c811468ff833b8a185fa4179e03b4bf33 Mon Sep 17 00:00:00 2001 From: laurentsimon Date: Mon, 9 May 2022 18:29:37 +0000 Subject: [PATCH 1/2] updates --- options/options.go | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/options/options.go b/options/options.go index c8adf3eb4ef..44dc6afa81a 100644 --- a/options/options.go +++ b/options/options.go @@ -28,22 +28,20 @@ import ( // Options define common options for configuring scorecard. type Options struct { - Repo string `env:"GITHUB_REPOSITORY"` + Repo string Local string - Commit string `env:"GITHUB_REF"` + Commit string LogLevel string - Format string `env:"SCORECARD_RESULTS_FORMAT"` + Format string NPM string PyPI string RubyGems string - PolicyFile string `env:"SCORECARD_POLICY_FILE"` + PolicyFile string // TODO(action): Add logic for writing results to file - ResultsFile string `env:"SCORECARD_RESULTS_FILE"` - ChecksToRun []string `env:"SCORECARD_ENABLED_CHECKS"` + ResultsFile string + ChecksToRun []string Metadata []string ShowDetails bool - // TODO(action): Add logic for determining if results should be published. - PublishResults bool `env:"SCORECARD_PUBLISH_RESULTS"` // Feature flags. EnableSarif bool `env:"ENABLE_SARIF"` From f66f7a48dcc19477509693412829ed1ffcf11e3f Mon Sep 17 00:00:00 2001 From: laurentsimon Date: Mon, 9 May 2022 18:51:54 +0000 Subject: [PATCH 2/2] tests --- options/options_test.go | 2 -- 1 file changed, 2 deletions(-) diff --git a/options/options_test.go b/options/options_test.go index f300910c535..e7813c3818f 100644 --- a/options/options_test.go +++ b/options/options_test.go @@ -37,7 +37,6 @@ func TestOptions_Validate(t *testing.T) { ChecksToRun []string Metadata []string ShowDetails bool - PublishResults bool EnableSarif bool EnableScorecardV5 bool EnableScorecardV6 bool @@ -106,7 +105,6 @@ func TestOptions_Validate(t *testing.T) { ChecksToRun: tt.fields.ChecksToRun, Metadata: tt.fields.Metadata, ShowDetails: tt.fields.ShowDetails, - PublishResults: tt.fields.PublishResults, EnableSarif: tt.fields.EnableSarif, EnableScorecardV5: tt.fields.EnableScorecardV5, EnableScorecardV6: tt.fields.EnableScorecardV6,