You've already forked woodpecker
mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2025-11-23 21:44:44 +02:00
fix(deps): update module github.com/google/go-github/v59 to v60 (#3493)
This commit is contained in:
@@ -26,7 +26,7 @@ import (
|
||||
"strconv"
|
||||
"strings"
|
||||
|
||||
"github.com/google/go-github/v59/github"
|
||||
"github.com/google/go-github/v60/github"
|
||||
"github.com/rs/zerolog/log"
|
||||
"golang.org/x/oauth2"
|
||||
|
||||
@@ -465,15 +465,7 @@ func matchingHooks(hooks []*github.Hook, rawurl string) *github.Hook {
|
||||
if hook.ID == nil {
|
||||
continue
|
||||
}
|
||||
v, ok := hook.Config["url"]
|
||||
if !ok {
|
||||
continue
|
||||
}
|
||||
s, ok := v.(string)
|
||||
if !ok {
|
||||
continue
|
||||
}
|
||||
hookURL, err := url.Parse(s)
|
||||
hookURL, err := url.Parse(hook.Config.GetURL())
|
||||
if err == nil && hookURL.Host == link.Host {
|
||||
return hook
|
||||
}
|
||||
@@ -528,9 +520,9 @@ func (c *client) Activate(ctx context.Context, u *model.User, r *model.Repo, lin
|
||||
"pull_request",
|
||||
"deployment",
|
||||
},
|
||||
Config: map[string]any{
|
||||
"url": link,
|
||||
"content_type": "form",
|
||||
Config: &github.HookConfig{
|
||||
URL: &link,
|
||||
ContentType: github.String("form"),
|
||||
},
|
||||
}
|
||||
_, _, err := client.Repositories.CreateHook(ctx, r.Owner, r.Name, hook)
|
||||
|
||||
Reference in New Issue
Block a user