Skip to content

Commit

Permalink
Merge branch 'main' into cleanup/dave/typos
Browse files Browse the repository at this point in the history
  • Loading branch information
daveworth committed Dec 14, 2023
2 parents 06e3c44 + d5900ed commit 1862447
Show file tree
Hide file tree
Showing 8 changed files with 15 additions and 16 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ jobs:
fetch-depth: 2 # needed to diff changed files
- id: files
name: Get changed files
uses: tj-actions/changed-files@1c938490c880156b746568a518594309cfb3f66b #v40.2.1
uses: tj-actions/changed-files@94549999469dbfa032becf298d95c87a14c34394 #v40.2.2
with:
files_ignore: '**.md'
- id: docs_only_check
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/stale.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
with:
egress-policy: audit # TODO: change to 'egress-policy: block' after couple of runs

- uses: actions/stale@1160a2240286f5da8ec72b1c0816ce2481aabf84 # v3.0.18
- uses: actions/stale@28ca1036281a5e5922ead5184a1bbf96e5fc984e # v3.0.18
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
stale-issue-message: 'This issue is stale because it has been open for 60 days with no activity.'
Expand Down
2 changes: 1 addition & 1 deletion cron/internal/format/json_raw_results.go
Original file line number Diff line number Diff line change
Expand Up @@ -201,9 +201,9 @@ func addDependencyUpdateToolRawResults(r *jsonScorecardRawResult,
return nil
}

//nolint:unparam
func addBranchProtectionRawResults(r *jsonScorecardRawResult, bp *checker.BranchProtectionsData) error {
r.Results.BranchProtections = []jsonBranchProtection{}
//nolint:gocritic
for _, v := range bp.Branches {
var bp *jsonBranchProtectionSettings
if v.Protected != nil && *v.Protected {
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ require (
contrib.go.opencensus.io/exporter/stackdriver v0.13.14
github.com/bombsimon/logrusr/v2 v2.0.1
github.com/bradleyfalzon/ghinstallation/v2 v2.8.0
github.com/go-git/go-git/v5 v5.10.1
github.com/go-git/go-git/v5 v5.11.0
github.com/go-logr/logr v1.3.0
github.com/golang/mock v1.6.0
github.com/google/go-cmp v0.6.0
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -287,8 +287,8 @@ github.com/go-git/go-billy/v5 v5.5.0 h1:yEY4yhzCDuMGSv83oGxiBotRzhwhNr8VZyphhiu+
github.com/go-git/go-billy/v5 v5.5.0/go.mod h1:hmexnoNsr2SJU1Ju67OaNz5ASJY3+sHgFRpCtpDCKow=
github.com/go-git/go-git-fixtures/v4 v4.3.2-0.20231010084843-55a94097c399 h1:eMje31YglSBqCdIqdhKBW8lokaMrL3uTkpGYlE2OOT4=
github.com/go-git/go-git-fixtures/v4 v4.3.2-0.20231010084843-55a94097c399/go.mod h1:1OCfN199q1Jm3HZlxleg+Dw/mwps2Wbk9frAWm+4FII=
github.com/go-git/go-git/v5 v5.10.1 h1:tu8/D8i+TWxgKpzQ3Vc43e+kkhXqtsZCKI/egajKnxk=
github.com/go-git/go-git/v5 v5.10.1/go.mod h1:uEuHjxkHap8kAl//V5F/nNWwqIYtP/402ddd05mp0wg=
github.com/go-git/go-git/v5 v5.11.0 h1:XIZc1p+8YzypNr34itUfSvYJcv+eYdTnTvOZ2vD3cA4=
github.com/go-git/go-git/v5 v5.11.0/go.mod h1:6GFcX2P3NM7FPBfpePbpLd21XxsgdAt+lKqXmCUiUCY=
github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU=
github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8=
github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8=
Expand Down
2 changes: 1 addition & 1 deletion pkg/json_raw_results.go
Original file line number Diff line number Diff line change
Expand Up @@ -703,9 +703,9 @@ func (r *jsonScorecardRawResult) addDependencyUpdateToolRawResults(dut *checker.
return nil
}

//nolint:unparam
func (r *jsonScorecardRawResult) addBranchProtectionRawResults(bp *checker.BranchProtectionsData) error {
branches := []jsonBranchProtection{}
//nolint:gocritic
for _, v := range bp.Branches {
var bp *jsonBranchProtectionSettings
if v.Protected != nil && *v.Protected {
Expand Down
8 changes: 4 additions & 4 deletions pkg/json_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -74,11 +74,11 @@ func TestJSONOutput(t *testing.T) {
scorecardCommit := "ccbc59901773ab4c051dfcea0cc4201a1567abdd"
scorecardVersion := "1.2.3"
repoName := "org/name"
date, e := time.Parse(time.RFC3339, "2023-03-02T10:30:43-06:00")
t.Logf("date: %v", date)
if e != nil {
panic(fmt.Errorf("time.Parse: %w", e))
date, err := time.Parse(time.RFC3339, "2023-03-02T10:30:43-06:00")
if err != nil {
t.Fatalf("time.Parse: %v", err)
}
t.Logf("date: %v", date)

checkDocs := jsonMockDocRead()

Expand Down
9 changes: 4 additions & 5 deletions pkg/scorecard_result_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ package pkg
import (
"bytes"
"encoding/json"
"fmt"
"os"
"testing"
"time"
Expand All @@ -33,11 +32,11 @@ import (
func mockScorecardResultCheck1(t *testing.T) *ScorecardResult {
t.Helper()
// Helper variables to mock Scorecard results
date, e := time.Parse(time.RFC3339, "2023-03-02T10:30:43-06:00")
t.Logf("date: %v", date)
if e != nil {
panic(fmt.Errorf("time.Parse: %w", e))
date, err := time.Parse(time.RFC3339, "2023-03-02T10:30:43-06:00")
if err != nil {
t.Fatalf("time.Parse: %v", err)
}
t.Logf("date: %v", date)

return &ScorecardResult{
Repo: RepoInfo{
Expand Down

0 comments on commit 1862447

Please sign in to comment.