Skip to content

Commit

Permalink
🐛 Fixes Run all checks on a BranchProtection event - failing tests (#897
Browse files Browse the repository at this point in the history
)

* Run all checks on a BranchProtection event

Signed-off-by: Azeem Shaikh <[email protected]>

* Fixed the failing tests.

Signed-off-by: naveensrinivasan <[email protected]>

Signed-off-by: Azeem Shaikh <[email protected]>
Signed-off-by: naveensrinivasan <[email protected]>
Co-authored-by: Azeem Shaikh <[email protected]>
  • Loading branch information
naveensrinivasan and azeemshaikh38 authored Sep 9, 2022
1 parent f437b3c commit 68bf5b3
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 9 deletions.
2 changes: 1 addition & 1 deletion action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
6 changes: 0 additions & 6 deletions options/options.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
)

Expand Down Expand Up @@ -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

Expand Down
2 changes: 0 additions & 2 deletions options/options_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ import (
"testing"

"github.com/google/go-cmp/cmp"
"github.com/ossf/scorecard/v4/checks"
"github.com/ossf/scorecard/v4/options"
)

Expand Down Expand Up @@ -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,
Expand Down

0 comments on commit 68bf5b3

Please sign in to comment.