From 672154a24d6d3736b814e5df29a0c6a85b54591d Mon Sep 17 00:00:00 2001 From: Christian Volk Date: Wed, 22 Jan 2025 14:06:49 +0100 Subject: [PATCH] chore: update github.com/google/go-github to v68 (#5231) --- cmd/checkmarxExecuteScan.go | 2 +- cmd/checkmarxExecuteScan_test.go | 2 +- cmd/checkmarxOneExecuteScan.go | 2 +- cmd/detectExecuteScan.go | 2 +- cmd/detectExecuteScan_test.go | 2 +- cmd/fortifyExecuteScan.go | 7 +++---- cmd/fortifyExecuteScan_test.go | 4 ++-- cmd/githubCheckBranchProtection.go | 6 +++--- cmd/githubCheckBranchProtection_test.go | 6 +++--- cmd/githubCommentIssue.go | 2 +- cmd/githubCommentIssue_test.go | 2 +- cmd/githubCreateIssue.go | 2 +- cmd/githubCreateIssue_test.go | 2 +- cmd/githubCreatePullRequest.go | 2 +- cmd/githubCreatePullRequest_test.go | 2 +- cmd/githubPublishRelease.go | 2 +- cmd/githubPublishRelease_test.go | 2 +- cmd/githubSetCommitStatus.go | 2 +- cmd/githubSetCommitStatus_test.go | 2 +- cmd/mocks/GithubRepoClient.go | 2 +- cmd/whitesourceExecuteScan.go | 2 +- cmd/whitesourceExecuteScan_test.go | 2 +- go.mod | 2 +- go.sum | 4 ++-- pkg/codeql/codeql.go | 2 +- pkg/codeql/codeql_test.go | 6 +++--- pkg/github/commit.go | 2 +- pkg/github/create_issue.go | 2 +- pkg/github/create_issue_test.go | 2 +- pkg/github/github.go | 2 +- pkg/github/secret.go | 2 +- pkg/github/secret_test.go | 2 +- pkg/orchestrator/github_actions.go | 4 ++-- pkg/orchestrator/github_actions_test.go | 2 +- pkg/reporting/github.go | 2 +- pkg/reporting/github_test.go | 2 +- 36 files changed, 47 insertions(+), 48 deletions(-) diff --git a/cmd/checkmarxExecuteScan.go b/cmd/checkmarxExecuteScan.go index 5a284f8748..dd1865d6f0 100644 --- a/cmd/checkmarxExecuteScan.go +++ b/cmd/checkmarxExecuteScan.go @@ -27,7 +27,7 @@ import ( "github.com/bmatcuk/doublestar" "github.com/pkg/errors" - "github.com/google/go-github/v45/github" + "github.com/google/go-github/v68/github" ) type checkmarxExecuteScanUtils interface { diff --git a/cmd/checkmarxExecuteScan_test.go b/cmd/checkmarxExecuteScan_test.go index b9ae183804..c7803c35ba 100644 --- a/cmd/checkmarxExecuteScan_test.go +++ b/cmd/checkmarxExecuteScan_test.go @@ -21,7 +21,7 @@ import ( "github.com/SAP/jenkins-library/pkg/checkmarx" "github.com/stretchr/testify/assert" - "github.com/google/go-github/v45/github" + "github.com/google/go-github/v68/github" ) type fileInfo struct { diff --git a/cmd/checkmarxOneExecuteScan.go b/cmd/checkmarxOneExecuteScan.go index 4eec98baf6..f06f5a2164 100644 --- a/cmd/checkmarxOneExecuteScan.go +++ b/cmd/checkmarxOneExecuteScan.go @@ -26,7 +26,7 @@ import ( "github.com/SAP/jenkins-library/pkg/telemetry" "github.com/SAP/jenkins-library/pkg/toolrecord" "github.com/bmatcuk/doublestar" - "github.com/google/go-github/v45/github" + "github.com/google/go-github/v68/github" "github.com/pkg/errors" ) diff --git a/cmd/detectExecuteScan.go b/cmd/detectExecuteScan.go index bd66108f66..ddf2347a81 100644 --- a/cmd/detectExecuteScan.go +++ b/cmd/detectExecuteScan.go @@ -29,7 +29,7 @@ import ( "github.com/SAP/jenkins-library/pkg/toolrecord" "github.com/SAP/jenkins-library/pkg/versioning" - "github.com/google/go-github/v45/github" + "github.com/google/go-github/v68/github" "github.com/pkg/errors" ) diff --git a/cmd/detectExecuteScan_test.go b/cmd/detectExecuteScan_test.go index 0c0949ef59..26fe6eebae 100644 --- a/cmd/detectExecuteScan_test.go +++ b/cmd/detectExecuteScan_test.go @@ -21,7 +21,7 @@ import ( "github.com/SAP/jenkins-library/pkg/mock" "github.com/SAP/jenkins-library/pkg/orchestrator" - "github.com/google/go-github/v45/github" + "github.com/google/go-github/v68/github" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) diff --git a/cmd/fortifyExecuteScan.go b/cmd/fortifyExecuteScan.go index ac8898a728..dce3013359 100644 --- a/cmd/fortifyExecuteScan.go +++ b/cmd/fortifyExecuteScan.go @@ -20,7 +20,7 @@ import ( "github.com/bmatcuk/doublestar" - "github.com/google/go-github/v45/github" + "github.com/google/go-github/v68/github" "github.com/google/uuid" "github.com/piper-validation/fortify-client-go/models" @@ -52,7 +52,7 @@ gradle.allprojects { ` type pullRequestService interface { - ListPullRequestsWithCommit(ctx context.Context, owner, repo, sha string, opts *github.PullRequestListOptions) ([]*github.PullRequest, *github.Response, error) + ListPullRequestsWithCommit(ctx context.Context, owner, repo, sha string, opts *github.ListOptions) ([]*github.PullRequest, *github.Response, error) } type fortifyUtils interface { @@ -1141,8 +1141,7 @@ func determinePullRequestMerge(config fortifyExecuteScanOptions) (string, string func determinePullRequestMergeGithub(ctx context.Context, config fortifyExecuteScanOptions, pullRequestServiceInstance pullRequestService) (string, string, error) { number := "0" author := "" - options := github.PullRequestListOptions{State: "closed", Sort: "updated", Direction: "desc"} - prList, _, err := pullRequestServiceInstance.ListPullRequestsWithCommit(ctx, config.Owner, config.Repository, config.CommitID, &options) + prList, _, err := pullRequestServiceInstance.ListPullRequestsWithCommit(ctx, config.Owner, config.Repository, config.CommitID, &github.ListOptions{}) if err == nil && prList != nil && len(prList) > 0 { number = fmt.Sprintf("%v", prList[0].GetNumber()) if prList[0].GetUser() != nil { diff --git a/cmd/fortifyExecuteScan_test.go b/cmd/fortifyExecuteScan_test.go index b5933e46c7..6006da0a3e 100644 --- a/cmd/fortifyExecuteScan_test.go +++ b/cmd/fortifyExecuteScan_test.go @@ -24,7 +24,7 @@ import ( "github.com/SAP/jenkins-library/pkg/log" "github.com/SAP/jenkins-library/pkg/versioning" - "github.com/google/go-github/v45/github" + "github.com/google/go-github/v68/github" "github.com/stretchr/testify/assert" "github.com/piper-validation/fortify-client-go/models" @@ -359,7 +359,7 @@ func (f *fortifyMock) DownloadResultFile(endpoint string, projectVersionID int64 type pullRequestServiceMock struct{} -func (prService pullRequestServiceMock) ListPullRequestsWithCommit(ctx context.Context, owner, repo, sha string, opts *github.PullRequestListOptions) ([]*github.PullRequest, *github.Response, error) { +func (prService pullRequestServiceMock) ListPullRequestsWithCommit(ctx context.Context, owner, repo, sha string, opts *github.ListOptions) ([]*github.PullRequest, *github.Response, error) { authorString := author user := github.User{Login: &authorString} if owner == "A" { diff --git a/cmd/githubCheckBranchProtection.go b/cmd/githubCheckBranchProtection.go index 2f85ebfee3..a3676a1bc0 100644 --- a/cmd/githubCheckBranchProtection.go +++ b/cmd/githubCheckBranchProtection.go @@ -7,7 +7,7 @@ import ( "github.com/SAP/jenkins-library/pkg/log" "github.com/SAP/jenkins-library/pkg/telemetry" - "github.com/google/go-github/v45/github" + "github.com/google/go-github/v68/github" "github.com/pkg/errors" @@ -41,8 +41,8 @@ func runGithubCheckBranchProtection(ctx context.Context, config *githubCheckBran for _, check := range config.RequiredChecks { var found bool foundContexts := []string{} - if requiredStatusChecks := ghProtection.GetRequiredStatusChecks(); requiredStatusChecks != nil { - foundContexts = requiredStatusChecks.Contexts + if requiredStatusChecks := ghProtection.GetRequiredStatusChecks(); requiredStatusChecks != nil && requiredStatusChecks.Contexts != nil { + foundContexts = *requiredStatusChecks.Contexts } for _, context := range foundContexts { if check == context { diff --git a/cmd/githubCheckBranchProtection_test.go b/cmd/githubCheckBranchProtection_test.go index a769a40c17..ae167bdb93 100644 --- a/cmd/githubCheckBranchProtection_test.go +++ b/cmd/githubCheckBranchProtection_test.go @@ -10,7 +10,7 @@ import ( "github.com/SAP/jenkins-library/pkg/telemetry" - "github.com/google/go-github/v45/github" + "github.com/google/go-github/v68/github" "github.com/stretchr/testify/assert" ) @@ -61,7 +61,7 @@ func TestRunGithubCheckBranchProtection(t *testing.T) { RequiredApprovingReviewCount: 1, } ghRepo := ghCheckBranchRepoService{protection: github.Protection{ - RequiredStatusChecks: &github.RequiredStatusChecks{Contexts: []string{"check0", "check1", "check2", "check3"}}, + RequiredStatusChecks: &github.RequiredStatusChecks{Contexts: &[]string{"check0", "check1", "check2", "check3"}}, EnforceAdmins: &github.AdminEnforcement{Enabled: true}, RequiredPullRequestReviews: &github.PullRequestReviewsEnforcement{RequiredApprovingReviewCount: 1}, }} @@ -86,7 +86,7 @@ func TestRunGithubCheckBranchProtection(t *testing.T) { RequiredChecks: []string{"check1", "check2"}, } ghRepo := ghCheckBranchRepoService{protection: github.Protection{ - RequiredStatusChecks: &github.RequiredStatusChecks{Contexts: []string{"check0", "check1"}}, + RequiredStatusChecks: &github.RequiredStatusChecks{Contexts: &[]string{"check0", "check1"}}, }} err := runGithubCheckBranchProtection(ctx, &config, &telemetryData, &ghRepo) assert.Contains(t, fmt.Sprint(err), "required status check 'check2' not found") diff --git a/cmd/githubCommentIssue.go b/cmd/githubCommentIssue.go index 3b4c8bc264..d1bb0a4ff2 100644 --- a/cmd/githubCommentIssue.go +++ b/cmd/githubCommentIssue.go @@ -5,7 +5,7 @@ import ( "github.com/SAP/jenkins-library/pkg/log" "github.com/SAP/jenkins-library/pkg/telemetry" - "github.com/google/go-github/v45/github" + "github.com/google/go-github/v68/github" "github.com/pkg/errors" piperGithub "github.com/SAP/jenkins-library/pkg/github" diff --git a/cmd/githubCommentIssue_test.go b/cmd/githubCommentIssue_test.go index 50d28dd4dc..d685aa0ecb 100644 --- a/cmd/githubCommentIssue_test.go +++ b/cmd/githubCommentIssue_test.go @@ -9,7 +9,7 @@ import ( "net/http" "testing" - "github.com/google/go-github/v45/github" + "github.com/google/go-github/v68/github" "github.com/stretchr/testify/assert" ) diff --git a/cmd/githubCreateIssue.go b/cmd/githubCreateIssue.go index dfb9f930d8..9d545bbbfa 100644 --- a/cmd/githubCreateIssue.go +++ b/cmd/githubCreateIssue.go @@ -9,7 +9,7 @@ import ( "github.com/pkg/errors" piperGithub "github.com/SAP/jenkins-library/pkg/github" - github "github.com/google/go-github/v45/github" + github "github.com/google/go-github/v68/github" ) type githubCreateIssueUtils interface { diff --git a/cmd/githubCreateIssue_test.go b/cmd/githubCreateIssue_test.go index 07a23fced8..d59a8198fa 100644 --- a/cmd/githubCreateIssue_test.go +++ b/cmd/githubCreateIssue_test.go @@ -8,7 +8,7 @@ import ( piperGithub "github.com/SAP/jenkins-library/pkg/github" "github.com/SAP/jenkins-library/pkg/mock" - github "github.com/google/go-github/v45/github" + github "github.com/google/go-github/v68/github" "github.com/stretchr/testify/assert" ) diff --git a/cmd/githubCreatePullRequest.go b/cmd/githubCreatePullRequest.go index 32c007c6ee..872e505130 100644 --- a/cmd/githubCreatePullRequest.go +++ b/cmd/githubCreatePullRequest.go @@ -5,7 +5,7 @@ import ( "github.com/SAP/jenkins-library/pkg/log" "github.com/SAP/jenkins-library/pkg/telemetry" - "github.com/google/go-github/v45/github" + "github.com/google/go-github/v68/github" "github.com/pkg/errors" piperGithub "github.com/SAP/jenkins-library/pkg/github" diff --git a/cmd/githubCreatePullRequest_test.go b/cmd/githubCreatePullRequest_test.go index 8eebe7612c..a6e8b5b604 100644 --- a/cmd/githubCreatePullRequest_test.go +++ b/cmd/githubCreatePullRequest_test.go @@ -9,7 +9,7 @@ import ( "net/http" "testing" - "github.com/google/go-github/v45/github" + "github.com/google/go-github/v68/github" "github.com/stretchr/testify/assert" ) diff --git a/cmd/githubPublishRelease.go b/cmd/githubPublishRelease.go index 2267b841cb..daaeb04643 100644 --- a/cmd/githubPublishRelease.go +++ b/cmd/githubPublishRelease.go @@ -10,7 +10,7 @@ import ( "github.com/SAP/jenkins-library/pkg/log" "github.com/SAP/jenkins-library/pkg/telemetry" - "github.com/google/go-github/v45/github" + "github.com/google/go-github/v68/github" "github.com/pkg/errors" piperGithub "github.com/SAP/jenkins-library/pkg/github" diff --git a/cmd/githubPublishRelease_test.go b/cmd/githubPublishRelease_test.go index 8573170093..246440ac1a 100644 --- a/cmd/githubPublishRelease_test.go +++ b/cmd/githubPublishRelease_test.go @@ -13,7 +13,7 @@ import ( "time" "github.com/SAP/jenkins-library/cmd/mocks" - "github.com/google/go-github/v45/github" + "github.com/google/go-github/v68/github" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/mock" ) diff --git a/cmd/githubSetCommitStatus.go b/cmd/githubSetCommitStatus.go index ac73c15723..30b369f1d4 100644 --- a/cmd/githubSetCommitStatus.go +++ b/cmd/githubSetCommitStatus.go @@ -7,7 +7,7 @@ import ( "github.com/SAP/jenkins-library/pkg/log" "github.com/SAP/jenkins-library/pkg/telemetry" - "github.com/google/go-github/v45/github" + "github.com/google/go-github/v68/github" "github.com/pkg/errors" diff --git a/cmd/githubSetCommitStatus_test.go b/cmd/githubSetCommitStatus_test.go index b3e78e61f5..6a8758c90a 100644 --- a/cmd/githubSetCommitStatus_test.go +++ b/cmd/githubSetCommitStatus_test.go @@ -10,7 +10,7 @@ import ( "github.com/SAP/jenkins-library/pkg/telemetry" - "github.com/google/go-github/v45/github" + "github.com/google/go-github/v68/github" "github.com/stretchr/testify/assert" ) diff --git a/cmd/mocks/GithubRepoClient.go b/cmd/mocks/GithubRepoClient.go index 3c8394915a..ab51aadf23 100644 --- a/cmd/mocks/GithubRepoClient.go +++ b/cmd/mocks/GithubRepoClient.go @@ -5,7 +5,7 @@ package mocks import ( context "context" - github "github.com/google/go-github/v45/github" + github "github.com/google/go-github/v68/github" mock "github.com/stretchr/testify/mock" os "os" diff --git a/cmd/whitesourceExecuteScan.go b/cmd/whitesourceExecuteScan.go index 16c9f09d2a..a204e47bee 100644 --- a/cmd/whitesourceExecuteScan.go +++ b/cmd/whitesourceExecuteScan.go @@ -29,7 +29,7 @@ import ( "github.com/pkg/errors" "github.com/xuri/excelize/v2" - "github.com/google/go-github/v45/github" + "github.com/google/go-github/v68/github" ) // ScanOptions is just used to make the lines less long diff --git a/cmd/whitesourceExecuteScan_test.go b/cmd/whitesourceExecuteScan_test.go index d1383c17ae..5482a03357 100644 --- a/cmd/whitesourceExecuteScan_test.go +++ b/cmd/whitesourceExecuteScan_test.go @@ -16,7 +16,7 @@ import ( "github.com/pkg/errors" "github.com/stretchr/testify/assert" - "github.com/google/go-github/v45/github" + "github.com/google/go-github/v68/github" ) type whitesourceUtilsMock struct { diff --git a/go.mod b/go.mod index 05ee007bbe..0905ed988e 100644 --- a/go.mod +++ b/go.mod @@ -30,7 +30,7 @@ require ( github.com/go-playground/validator/v10 v10.14.1 github.com/google/go-cmp v0.6.0 github.com/google/go-containerregistry v0.19.0 - github.com/google/go-github/v45 v45.2.0 + github.com/google/go-github/v68 v68.0.0 github.com/google/uuid v1.6.0 github.com/hashicorp/go-retryablehttp v0.7.7 github.com/hashicorp/vault/api v1.15.0 diff --git a/go.sum b/go.sum index 35ac38e72a..45e5e484d9 100644 --- a/go.sum +++ b/go.sum @@ -511,8 +511,8 @@ github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/go-containerregistry v0.19.0 h1:uIsMRBV7m/HDkDxE/nXMnv1q+lOOSPlQ/ywc5JbB8Ic= github.com/google/go-containerregistry v0.19.0/go.mod h1:u0qB2l7mvtWVR5kNcbFIhFY1hLbf8eeGapA+vbFDCtQ= -github.com/google/go-github/v45 v45.2.0 h1:5oRLszbrkvxDDqBCNj2hjDZMKmvexaZ1xw/FCD+K3FI= -github.com/google/go-github/v45 v45.2.0/go.mod h1:FObaZJEDSTa/WGCzZ2Z3eoCDXWJKMenWWTrd8jrta28= +github.com/google/go-github/v68 v68.0.0 h1:ZW57zeNZiXTdQ16qrDiZ0k6XucrxZ2CGmoTvcCyQG6s= +github.com/google/go-github/v68 v68.0.0/go.mod h1:K9HAUBovM2sLwM408A18h+wd9vqdLOEqTUCbnRIcx68= github.com/google/go-querystring v1.1.0 h1:AnCroh3fv4ZBgVIf1Iwtovgjaw/GiKJo8M8yD/fhyJ8= github.com/google/go-querystring v1.1.0/go.mod h1:Kcdr2DB4koayq7X8pmAG4sNG59So17icRSOU623lUBU= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= diff --git a/pkg/codeql/codeql.go b/pkg/codeql/codeql.go index abf09036ed..96c986c9c2 100644 --- a/pkg/codeql/codeql.go +++ b/pkg/codeql/codeql.go @@ -4,7 +4,7 @@ import ( "context" piperGithub "github.com/SAP/jenkins-library/pkg/github" - "github.com/google/go-github/v45/github" + "github.com/google/go-github/v68/github" ) type CodeqlScanAudit interface { diff --git a/pkg/codeql/codeql_test.go b/pkg/codeql/codeql_test.go index e056a51926..5ebdcfdb6a 100644 --- a/pkg/codeql/codeql_test.go +++ b/pkg/codeql/codeql_test.go @@ -8,7 +8,7 @@ import ( "errors" "testing" - "github.com/google/go-github/v45/github" + "github.com/google/go-github/v68/github" "github.com/stretchr/testify/assert" ) @@ -34,7 +34,7 @@ func (g *githubCodeqlScanningMock) ListAlertsForRepo(ctx context.Context, owner, } if repo == "testRepo2" { - if opts.Page == 1 { + if opts.ListOptions.Page == 1 { for i := 0; i < 50; i++ { alerts = append(alerts, &github.Alert{State: &openState, Tool: &github.Tool{Name: &codeqlToolName}, Rule: &github.Rule{Tags: []string{"security"}}}) alerts = append(alerts, &github.Alert{State: &dismissedState, Tool: &github.Tool{Name: &testToolName}, Rule: &github.Rule{Tags: []string{"useless_code"}}}) @@ -46,7 +46,7 @@ func (g *githubCodeqlScanningMock) ListAlertsForRepo(ctx context.Context, owner, response.NextPage = 2 } - if opts.Page == 2 { + if opts.ListOptions.Page == 2 { for i := 0; i < 10; i++ { alerts = append(alerts, &github.Alert{State: &openState, Tool: &github.Tool{Name: &codeqlToolName}, Rule: &github.Rule{Tags: []string{"security"}}}) alerts = append(alerts, &github.Alert{State: &dismissedState, Tool: &github.Tool{Name: &testToolName}, Rule: &github.Rule{Tags: []string{"useless_code"}}}) diff --git a/pkg/github/commit.go b/pkg/github/commit.go index 64b9ec7297..0d5353ccd3 100644 --- a/pkg/github/commit.go +++ b/pkg/github/commit.go @@ -1,7 +1,7 @@ package github import ( - "github.com/google/go-github/v45/github" + "github.com/google/go-github/v68/github" "github.com/pkg/errors" ) diff --git a/pkg/github/create_issue.go b/pkg/github/create_issue.go index f4cc7fc35f..7a6bcc4831 100644 --- a/pkg/github/create_issue.go +++ b/pkg/github/create_issue.go @@ -5,7 +5,7 @@ import ( "fmt" "github.com/SAP/jenkins-library/pkg/log" - "github.com/google/go-github/v45/github" + "github.com/google/go-github/v68/github" "github.com/pkg/errors" ) diff --git a/pkg/github/create_issue_test.go b/pkg/github/create_issue_test.go index d58805435a..54d3f04b49 100644 --- a/pkg/github/create_issue_test.go +++ b/pkg/github/create_issue_test.go @@ -10,7 +10,7 @@ import ( "regexp" "testing" - "github.com/google/go-github/v45/github" + "github.com/google/go-github/v68/github" "github.com/stretchr/testify/assert" ) diff --git a/pkg/github/github.go b/pkg/github/github.go index 412f596c1a..256266d503 100644 --- a/pkg/github/github.go +++ b/pkg/github/github.go @@ -7,7 +7,7 @@ import ( "time" piperhttp "github.com/SAP/jenkins-library/pkg/http" - "github.com/google/go-github/v45/github" + "github.com/google/go-github/v68/github" "github.com/pkg/errors" "golang.org/x/oauth2" ) diff --git a/pkg/github/secret.go b/pkg/github/secret.go index 7a29813ea5..40600f77a9 100644 --- a/pkg/github/secret.go +++ b/pkg/github/secret.go @@ -4,7 +4,7 @@ import ( "crypto/rand" "encoding/base64" - "github.com/google/go-github/v45/github" + "github.com/google/go-github/v68/github" "golang.org/x/crypto/nacl/box" "github.com/SAP/jenkins-library/pkg/log" diff --git a/pkg/github/secret_test.go b/pkg/github/secret_test.go index 1afb66b94b..7b4c0b84ee 100644 --- a/pkg/github/secret_test.go +++ b/pkg/github/secret_test.go @@ -7,7 +7,7 @@ import ( "encoding/base64" "testing" - "github.com/google/go-github/v45/github" + "github.com/google/go-github/v68/github" "github.com/stretchr/testify/assert" ) diff --git a/pkg/orchestrator/github_actions.go b/pkg/orchestrator/github_actions.go index babd801c0b..00512e74ef 100644 --- a/pkg/orchestrator/github_actions.go +++ b/pkg/orchestrator/github_actions.go @@ -14,7 +14,7 @@ import ( piperGithub "github.com/SAP/jenkins-library/pkg/github" "github.com/SAP/jenkins-library/pkg/log" "github.com/SAP/jenkins-library/pkg/piperutils" - "github.com/google/go-github/v45/github" + "github.com/google/go-github/v68/github" "github.com/pkg/errors" "golang.org/x/sync/errgroup" ) @@ -109,7 +109,7 @@ func (g *githubActionsConfigProvider) FullLogs() ([]byte, error) { for i := range jobs { i := i // https://golang.org/doc/faq#closures_and_goroutines wg.Go(func() error { - _, resp, err := g.client.Actions.GetWorkflowJobLogs(g.ctx, g.owner, g.repo, jobs[i].ID, true) + _, resp, err := g.client.Actions.GetWorkflowJobLogs(g.ctx, g.owner, g.repo, jobs[i].ID, 1) if err != nil { // GetWorkflowJobLogs returns "200 OK" as error when log download is successful. // Therefore, ignore this error. diff --git a/pkg/orchestrator/github_actions_test.go b/pkg/orchestrator/github_actions_test.go index be15ee0a88..864f73756c 100644 --- a/pkg/orchestrator/github_actions_test.go +++ b/pkg/orchestrator/github_actions_test.go @@ -11,7 +11,7 @@ import ( "testing" "time" - "github.com/google/go-github/v45/github" + "github.com/google/go-github/v68/github" "github.com/jarcoal/httpmock" "github.com/stretchr/testify/assert" ) diff --git a/pkg/reporting/github.go b/pkg/reporting/github.go index 4389730ef9..b56d0b7dbe 100644 --- a/pkg/reporting/github.go +++ b/pkg/reporting/github.go @@ -5,7 +5,7 @@ import ( "fmt" "github.com/SAP/jenkins-library/pkg/log" - "github.com/google/go-github/v45/github" + "github.com/google/go-github/v68/github" ) type githubIssueService interface { diff --git a/pkg/reporting/github_test.go b/pkg/reporting/github_test.go index a8674d8267..624029f680 100644 --- a/pkg/reporting/github_test.go +++ b/pkg/reporting/github_test.go @@ -8,7 +8,7 @@ import ( "fmt" "testing" - "github.com/google/go-github/v45/github" + "github.com/google/go-github/v68/github" "github.com/stretchr/testify/assert" )