From 62e3de5f48f98b45e5c23a12fe7eb1cbf6bcb629 Mon Sep 17 00:00:00 2001 From: laurentsimon <64505099+laurentsimon@users.noreply.github.com> Date: Mon, 9 May 2022 12:40:15 -0700 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20Remove=20Options=20that=20belong?= =?UTF-8?q?=20to=20the=20Action=20(#1898)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * updates * tests --- options/options.go | 14 ++++++-------- options/options_test.go | 2 -- 2 files changed, 6 insertions(+), 10 deletions(-) diff --git a/options/options.go b/options/options.go index c8adf3eb..44dc6afa 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"` diff --git a/options/options_test.go b/options/options_test.go index f300910c..e7813c38 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,