From 68bf5b3327e4fd443d2add8ab122280547b4a16d Mon Sep 17 00:00:00 2001 From: Naveen <172697+naveensrinivasan@users.noreply.github.com> Date: Fri, 9 Sep 2022 12:28:42 -0500 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20Fixes=20Run=20all=20checks=20on?= =?UTF-8?q?=20a=20BranchProtection=20event=20-=20failing=20tests=20=20(#89?= =?UTF-8?q?7)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Run all checks on a BranchProtection event Signed-off-by: Azeem Shaikh * Fixed the failing tests. Signed-off-by: naveensrinivasan <172697+naveensrinivasan@users.noreply.github.com> Signed-off-by: Azeem Shaikh Signed-off-by: naveensrinivasan <172697+naveensrinivasan@users.noreply.github.com> Co-authored-by: Azeem Shaikh --- action.yaml | 2 +- options/options.go | 6 ------ options/options_test.go | 2 -- 3 files changed, 1 insertion(+), 9 deletions(-) diff --git a/action.yaml b/action.yaml index 25aa532e..4d80622e 100644 --- a/action.yaml +++ b/action.yaml @@ -53,4 +53,4 @@ branding: runs: using: "docker" - image: "docker://gcr.io/openssf/scorecard-action:v2.0.1" + image: "docker://gcr.io/openssf/scorecard-action:v2.0.2" diff --git a/options/options.go b/options/options.go index 34b66d95..d1490660 100644 --- a/options/options.go +++ b/options/options.go @@ -25,7 +25,6 @@ import ( "golang.org/x/net/context" "github.com/ossf/scorecard-action/github" - "github.com/ossf/scorecard/v4/checks" scopts "github.com/ossf/scorecard/v4/options" ) @@ -184,11 +183,6 @@ func (o *Options) setScorecardOpts() { o.ScorecardOpts.PolicyFile = defaultScorecardPolicyFile } - // --checks= - if o.GithubEventName == branchProtectionEvent { - o.ScorecardOpts.ChecksToRun = []string{checks.CheckBranchProtection} - } - // --show-details o.ScorecardOpts.ShowDetails = true diff --git a/options/options_test.go b/options/options_test.go index 6e6877b1..e63f826e 100644 --- a/options/options_test.go +++ b/options/options_test.go @@ -20,7 +20,6 @@ import ( "testing" "github.com/google/go-cmp/cmp" - "github.com/ossf/scorecard/v4/checks" "github.com/ossf/scorecard/v4/options" ) @@ -137,7 +136,6 @@ func TestNew(t *testing.T) { Commit: options.DefaultCommit, LogLevel: options.DefaultLogLevel, Repo: testRepo, - ChecksToRun: []string{checks.CheckBranchProtection}, ShowDetails: true, }, wantErr: false,