fix(deps): update module github.com/google/go-github/v59 to v60 (#3493)

This commit is contained in:
renovate[bot] 2024-03-16 09:37:08 +01:00 committed by GitHub
parent ee6885b632
commit 5d98a717ac
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 11 additions and 19 deletions

2
go.mod
View file

@ -27,7 +27,7 @@ require (
github.com/go-ap/httpsig v0.0.0-20221203064646-3647b4d88fdf github.com/go-ap/httpsig v0.0.0-20221203064646-3647b4d88fdf
github.com/go-sql-driver/mysql v1.8.0 github.com/go-sql-driver/mysql v1.8.0
github.com/golang-jwt/jwt/v5 v5.2.1 github.com/golang-jwt/jwt/v5 v5.2.1
github.com/google/go-github/v59 v59.0.0 github.com/google/go-github/v60 v60.0.0
github.com/google/tink/go v1.7.0 github.com/google/tink/go v1.7.0
github.com/gorilla/securecookie v1.1.2 github.com/gorilla/securecookie v1.1.2
github.com/jellydator/ttlcache/v3 v3.2.0 github.com/jellydator/ttlcache/v3 v3.2.0

4
go.sum
View file

@ -185,8 +185,8 @@ github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/
github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= 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-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
github.com/google/go-github/v59 v59.0.0 h1:7h6bgpF5as0YQLLkEiVqpgtJqjimMYhBkD4jT5aN3VA= github.com/google/go-github/v60 v60.0.0 h1:oLG98PsLauFvvu4D/YPxq374jhSxFYdzQGNCyONLfn8=
github.com/google/go-github/v59 v59.0.0/go.mod h1:rJU4R0rQHFVFDOkqGWxfLNo6vEk4dv40oDjhV/gH6wM= github.com/google/go-github/v60 v60.0.0/go.mod h1:ByhX2dP9XT9o/ll2yXAu2VD8l5eNVg8hD4Cr0S/LmQk=
github.com/google/go-querystring v1.1.0 h1:AnCroh3fv4ZBgVIf1Iwtovgjaw/GiKJo8M8yD/fhyJ8= 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/go-querystring v1.1.0/go.mod h1:Kcdr2DB4koayq7X8pmAG4sNG59So17icRSOU623lUBU=
github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg=

View file

@ -18,7 +18,7 @@ package github
import ( import (
"fmt" "fmt"
"github.com/google/go-github/v59/github" "github.com/google/go-github/v60/github"
"go.woodpecker-ci.org/woodpecker/v2/server/model" "go.woodpecker-ci.org/woodpecker/v2/server/model"
) )

View file

@ -19,7 +19,7 @@ import (
"testing" "testing"
"github.com/franela/goblin" "github.com/franela/goblin"
"github.com/google/go-github/v59/github" "github.com/google/go-github/v60/github"
"go.woodpecker-ci.org/woodpecker/v2/server/model" "go.woodpecker-ci.org/woodpecker/v2/server/model"
) )

View file

@ -26,7 +26,7 @@ import (
"strconv" "strconv"
"strings" "strings"
"github.com/google/go-github/v59/github" "github.com/google/go-github/v60/github"
"github.com/rs/zerolog/log" "github.com/rs/zerolog/log"
"golang.org/x/oauth2" "golang.org/x/oauth2"
@ -465,15 +465,7 @@ func matchingHooks(hooks []*github.Hook, rawurl string) *github.Hook {
if hook.ID == nil { if hook.ID == nil {
continue continue
} }
v, ok := hook.Config["url"] hookURL, err := url.Parse(hook.Config.GetURL())
if !ok {
continue
}
s, ok := v.(string)
if !ok {
continue
}
hookURL, err := url.Parse(s)
if err == nil && hookURL.Host == link.Host { if err == nil && hookURL.Host == link.Host {
return hook return hook
} }
@ -528,9 +520,9 @@ func (c *client) Activate(ctx context.Context, u *model.User, r *model.Repo, lin
"pull_request", "pull_request",
"deployment", "deployment",
}, },
Config: map[string]any{ Config: &github.HookConfig{
"url": link, URL: &link,
"content_type": "form", ContentType: github.String("form"),
}, },
} }
_, _, err := client.Repositories.CreateHook(ctx, r.Owner, r.Name, hook) _, _, err := client.Repositories.CreateHook(ctx, r.Owner, r.Name, hook)

View file

@ -22,7 +22,7 @@ import (
"net/http" "net/http"
"strings" "strings"
"github.com/google/go-github/v59/github" "github.com/google/go-github/v60/github"
"go.woodpecker-ci.org/woodpecker/v2/server/forge/types" "go.woodpecker-ci.org/woodpecker/v2/server/forge/types"
"go.woodpecker-ci.org/woodpecker/v2/server/model" "go.woodpecker-ci.org/woodpecker/v2/server/model"