Skip to content

Commit

Permalink
update dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
foosinn committed Jan 19, 2021
1 parent d4ff655 commit bc7fcf0
Show file tree
Hide file tree
Showing 767 changed files with 111,914 additions and 105,783 deletions.
28 changes: 16 additions & 12 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,21 @@ module github.com/bitsbeats/drone-tree-config
go 1.13

require (
github.com/drone/drone-go v1.0.4
github.com/google/go-github v17.0.0+incompatible
github.com/google/uuid v1.1.1
github.com/kelseyhightower/envconfig v1.3.0
github.com/sirupsen/logrus v1.4.1
github.com/stretchr/testify v1.5.1 // indirect
github.com/drone/drone-go v1.5.0
github.com/golang/protobuf v1.4.3 // indirect
github.com/google/go-github/v33 v33.0.0
github.com/google/uuid v1.1.5
github.com/hashicorp/go-retryablehttp v0.6.8 // indirect
github.com/kelseyhightower/envconfig v1.4.0
github.com/sirupsen/logrus v1.7.0
github.com/stretchr/testify v1.7.0 // indirect
github.com/wbrefvem/go-bitbucket v0.0.0-20190128183802-fc08fd046abb
github.com/xanzy/go-gitlab v0.28.0
golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3 // indirect
golang.org/x/oauth2 v0.0.0-20190402181905-9f3314589c9a
golang.org/x/sync v0.0.0-20190423024810-112230192c58 // indirect
golang.org/x/sys v0.0.0-20190412213103-97732733099d // indirect
gopkg.in/yaml.v2 v2.2.2
github.com/xanzy/go-gitlab v0.42.0
golang.org/x/net v0.0.0-20201224014010-6772e930b67b // indirect
golang.org/x/oauth2 v0.0.0-20210113205817-d3ed898aa8a3
golang.org/x/sys v0.0.0-20210113181707-4bcb84eeeb78 // indirect
golang.org/x/time v0.0.0-20201208040808-7e3f01d25324 // indirect
google.golang.org/appengine v1.6.7 // indirect
gopkg.in/yaml.v2 v2.4.0
gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b // indirect
)
408 changes: 387 additions & 21 deletions go.sum

Large diffs are not rendered by default.

18 changes: 9 additions & 9 deletions plugin/plugin_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -392,47 +392,47 @@ func TestCronConcat(t *testing.T) {

func testMux() *http.ServeMux {
mux := http.NewServeMux()
mux.HandleFunc("/repos/foosinn/dronetest/contents/",
mux.HandleFunc("/api/v3/repos/foosinn/dronetest/contents/",
func(w http.ResponseWriter, r *http.Request) {
f, _ := os.Open("testdata/github/root.json")
_, _ = io.Copy(w, f)
})
mux.HandleFunc("/repos/foosinn/dronetest/compare/2897b31ec3a1b59279a08a8ad54dc360686327f7...8ecad91991d5da985a2a8dd97cc19029dc1c2899",
mux.HandleFunc("/api/v3/repos/foosinn/dronetest/compare/2897b31ec3a1b59279a08a8ad54dc360686327f7...8ecad91991d5da985a2a8dd97cc19029dc1c2899",
func(w http.ResponseWriter, r *http.Request) {
f, _ := os.Open("testdata/github/compare.json")
_, _ = io.Copy(w, f)
})
mux.HandleFunc("/repos/foosinn/dronetest/contents/a/b/.drone.yml",
mux.HandleFunc("/api/v3/repos/foosinn/dronetest/contents/a/b/.drone.yml",
func(w http.ResponseWriter, r *http.Request) {
f, _ := os.Open("testdata/github/a_b_.drone.yml.json")
_, _ = io.Copy(w, f)
})
mux.HandleFunc("/repos/foosinn/dronetest/contents/.drone.yml",
mux.HandleFunc("/api/v3/repos/foosinn/dronetest/contents/.drone.yml",
func(w http.ResponseWriter, r *http.Request) {
f, _ := os.Open("testdata/github/.drone.yml.json")
_, _ = io.Copy(w, f)
})
mux.HandleFunc("/repos/foosinn/dronetest/contents/.drone-consider",
mux.HandleFunc("/api/v3/repos/foosinn/dronetest/contents/.drone-consider",
func(w http.ResponseWriter, r *http.Request) {
f, _ := os.Open("testdata/github/.drone-consider.json")
_, _ = io.Copy(w, f)
})
mux.HandleFunc("/repos/foosinn/dronetest/pulls/3/files",
mux.HandleFunc("/api/v3/repos/foosinn/dronetest/pulls/3/files",
func(w http.ResponseWriter, r *http.Request) {
f, _ := os.Open("testdata/github/pull_3_files.json")
_, _ = io.Copy(w, f)
})
mux.HandleFunc("/repos/foosinn/dronetest/contents/afolder/.drone.yml",
mux.HandleFunc("/api/v3/repos/foosinn/dronetest/contents/afolder/.drone.yml",
func(w http.ResponseWriter, r *http.Request) {
f, _ := os.Open("testdata/github/afolder_.drone.yml.json")
_, _ = io.Copy(w, f)
})
mux.HandleFunc("/repos/foosinn/dronetest/contents/afolder",
mux.HandleFunc("/api/v3/repos/foosinn/dronetest/contents/afolder",
func(w http.ResponseWriter, r *http.Request) {
f, _ := os.Open("testdata/github/afolder.json")
_, _ = io.Copy(w, f)
})
mux.HandleFunc("/repos/foosinn/dronetest/contents/afolder/abfolder",
mux.HandleFunc("/api/v3/repos/foosinn/dronetest/contents/afolder/abfolder",
func(w http.ResponseWriter, r *http.Request) {
f, _ := os.Open("testdata/github/afolder_abfolder.json")
_, _ = io.Copy(w, f)
Expand Down
2 changes: 1 addition & 1 deletion plugin/scm_clients/github_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"sync"

"github.com/drone/drone-go/drone"
"github.com/google/go-github/github"
"github.com/google/go-github/v33/github"
"github.com/google/uuid"
"github.com/sirupsen/logrus"
"golang.org/x/oauth2"
Expand Down
16 changes: 8 additions & 8 deletions plugin/scm_clients/github_client_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -99,32 +99,32 @@ func createGithubClient(server string) (ScmClient, error) {

func testMuxGithub() *http.ServeMux {
mux := http.NewServeMux()
mux.HandleFunc("/repos/foosinn/dronetest/contents/",
mux.HandleFunc("/api/v3/repos/foosinn/dronetest/contents/",
func(w http.ResponseWriter, r *http.Request) {
f, _ := os.Open("../testdata/github/root.json")
_, _ = io.Copy(w, f)
})
mux.HandleFunc("/repos/foosinn/dronetest/compare/2897b31ec3a1b59279a08a8ad54dc360686327f7...8ecad91991d5da985a2a8dd97cc19029dc1c2899",
mux.HandleFunc("/api/v3/repos/foosinn/dronetest/compare/2897b31ec3a1b59279a08a8ad54dc360686327f7...8ecad91991d5da985a2a8dd97cc19029dc1c2899",
func(w http.ResponseWriter, r *http.Request) {
f, _ := os.Open("../testdata/github/compare.json")
_, _ = io.Copy(w, f)
})
mux.HandleFunc("/repos/foosinn/dronetest/contents/a/b/.drone.yml",
mux.HandleFunc("/api/v3/repos/foosinn/dronetest/contents/a/b/.drone.yml",
func(w http.ResponseWriter, r *http.Request) {
f, _ := os.Open("../testdata/github/a_b_.drone.yml.json")
_, _ = io.Copy(w, f)
})
mux.HandleFunc("/repos/foosinn/dronetest/contents/.drone.yml",
mux.HandleFunc("/api/v3/repos/foosinn/dronetest/contents/.drone.yml",
func(w http.ResponseWriter, r *http.Request) {
f, _ := os.Open("../testdata/github/.drone.yml.json")
_, _ = io.Copy(w, f)
})
mux.HandleFunc("/repos/foosinn/dronetest/pulls/3/files",
mux.HandleFunc("/api/v3/repos/foosinn/dronetest/pulls/3/files",
func(w http.ResponseWriter, r *http.Request) {
f, _ := os.Open("../testdata/github/pull_3_files.json")
_, _ = io.Copy(w, f)
})
mux.HandleFunc("/repos/foosinn/dronetest/pulls/4/files",
mux.HandleFunc("/api/v3/repos/foosinn/dronetest/pulls/4/files",
func(w http.ResponseWriter, r *http.Request) {
// simulate a paginated response
if r.FormValue("page") == "" {
Expand All @@ -135,12 +135,12 @@ func testMuxGithub() *http.ServeMux {
f, _ := os.Open("../testdata/github/pull_3_files.json")
_, _ = io.Copy(w, f)
})
mux.HandleFunc("/repos/foosinn/dronetest/contents/afolder/.drone.yml",
mux.HandleFunc("/api/v3/repos/foosinn/dronetest/contents/afolder/.drone.yml",
func(w http.ResponseWriter, r *http.Request) {
f, _ := os.Open("../testdata/github/afolder_.drone.yml.json")
_, _ = io.Copy(w, f)
})
mux.HandleFunc("/repos/foosinn/dronetest/contents/afolder",
mux.HandleFunc("/api/v3/repos/foosinn/dronetest/contents/afolder",
func(w http.ResponseWriter, r *http.Request) {
f, _ := os.Open("../testdata/github/afolder.json")
_, _ = io.Copy(w, f)
Expand Down
10 changes: 8 additions & 2 deletions plugin/scm_clients/gitlab_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,15 @@ type GitlabClient struct {
}

func NewGitLabClient(ctx context.Context, uuid uuid.UUID, server string, token string, repo drone.Repo) (ScmClient, error) {
client := gitlab.NewClient(nil, token)
var client *gitlab.Client
var err error
if server != "" {
client.SetBaseURL(server)
client, err = gitlab.NewClient(token, gitlab.WithBaseURL(server))
} else {
client, err = gitlab.NewClient(token)
}
if err != nil {
return nil, err
}
return GitlabClient{
delegate: client,
Expand Down
58 changes: 55 additions & 3 deletions vendor/github.com/drone/drone-go/drone/client.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

15 changes: 14 additions & 1 deletion vendor/github.com/drone/drone-go/drone/interface.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit bc7fcf0

Please sign in to comment.