Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support gitlab subgroup and subsubgroups etc when creating PRs #2288

Merged
merged 12 commits into from
Jan 31, 2023
75 changes: 16 additions & 59 deletions cmd/clusters-service/pkg/git/git.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,19 @@ import (
"context"
"errors"
"fmt"
"os"
"path"
"path/filepath"
"strings"
"time"

"github.com/fluxcd/go-git-providers/github"
"github.com/fluxcd/go-git-providers/gitlab"
"github.com/fluxcd/go-git-providers/gitprovider"
go_git "github.com/go-git/go-git/v5"
"github.com/go-git/go-git/v5/plumbing/transport"
"github.com/go-git/go-git/v5/plumbing/transport/http"
"github.com/go-logr/logr"
"github.com/spf13/viper"
go_git "gopkg.in/src-d/go-git.v4"
"gopkg.in/src-d/go-git.v4/plumbing"
"gopkg.in/src-d/go-git.v4/plumbing/transport"
"gopkg.in/src-d/go-git.v4/plumbing/transport/http"
"k8s.io/apimachinery/pkg/util/wait"
"k8s.io/client-go/util/retry"
)
Expand All @@ -33,7 +32,6 @@ var DefaultBackoff = wait.Backoff{

type Provider interface {
WriteFilesToBranchAndCreatePullRequest(ctx context.Context, req WriteFilesToBranchAndCreatePullRequestRequest) (*WriteFilesToBranchAndCreatePullRequestResponse, error)
CloneRepoToTempDir(req CloneRepoToTempDirRequest) (*CloneRepoToTempDirResponse, error)
GetRepository(ctx context.Context, gp GitProvider, url string) (gitprovider.OrgRepository, error)
GetTreeList(ctx context.Context, gp GitProvider, repoUrl string, sha string, path string, recursive bool) ([]*gitprovider.TreeEntry, error)
ListPullRequests(ctx context.Context, gp GitProvider, url string) ([]gitprovider.PullRequest, error)
Expand Down Expand Up @@ -72,17 +70,6 @@ type WriteFilesToBranchAndCreatePullRequestResponse struct {
WebURL string
}

type CloneRepoToTempDirRequest struct {
GitProvider GitProvider
RepositoryURL string
BaseBranch string
ParentDir string
}

type CloneRepoToTempDirResponse struct {
Repo *GitRepo
}

// WriteFilesToBranchAndCreatePullRequest writes a set of provided files
// to a new branch and creates a new pull request for that branch.
// It returns the URL of the pull request.
Expand All @@ -92,7 +79,7 @@ func (s *GitProviderService) WriteFilesToBranchAndCreatePullRequest(ctx context.

repoURL, err := GetGitProviderUrl(req.RepositoryURL)
if err != nil {
return nil, fmt.Errorf("unable to get git porivder url: %w", err)
return nil, fmt.Errorf("unable to get git provider url: %w", err)
}

repo, err := s.GetRepository(ctx, req.GitProvider, repoURL)
Expand Down Expand Up @@ -148,47 +135,6 @@ func (s *GitProviderService) WriteFilesToBranchAndCreatePullRequest(ctx context.
}, nil
}

func (s *GitProviderService) CloneRepoToTempDir(req CloneRepoToTempDirRequest) (*CloneRepoToTempDirResponse, error) {
s.log.Info("Creating a temp directory...")
gitDir, err := os.MkdirTemp(req.ParentDir, "git-")
if err != nil {
return nil, err
}
s.log.Info("Temp directory created.", "dir", gitDir)

s.log.Info("Cloning the Git repository...", "repository", req.RepositoryURL, "dir", gitDir)

repo, err := go_git.PlainClone(gitDir, false, &go_git.CloneOptions{
URL: req.RepositoryURL,
Auth: &http.BasicAuth{
Username: "abc123",
Password: req.GitProvider.Token,
},
ReferenceName: plumbing.NewBranchReferenceName(req.BaseBranch),

SingleBranch: true,
Tags: go_git.NoTags,
})
if err != nil {
return nil, err
}

s.log.Info("Cloned repository", "repository", req.RepositoryURL)

gitRepo := &GitRepo{
WorktreeDir: gitDir,
Repo: repo,
Auth: &http.BasicAuth{
Username: "abc123",
Password: req.GitProvider.Token,
},
}

return &CloneRepoToTempDirResponse{
Repo: gitRepo,
}, nil
}

type GitRepo struct {
WorktreeDir string
Repo *go_git.Repository
Expand All @@ -207,6 +153,7 @@ func (s *GitProviderService) GetRepository(ctx context.Context, gp GitProvider,
}

ref.Domain = addSchemeToDomain(ref.Domain)
ref = WithCombinedSubOrgs(*ref)

var repo gitprovider.OrgRepository
err = retry.OnError(DefaultBackoff,
Expand All @@ -227,6 +174,16 @@ func (s *GitProviderService) GetRepository(ctx context.Context, gp GitProvider,
return repo, nil
}

// WithCombinedSubOrgs combines the subgroups into the organization field of the reference
// This is to work around a bug in the go-git-providers library where it doesn't handle subgroups correctly.
// https://github.com/fluxcd/go-git-providers/issues/183
func WithCombinedSubOrgs(ref gitprovider.OrgRepositoryRef) *gitprovider.OrgRepositoryRef {
orgsWithSubGroups := append([]string{ref.Organization}, ref.SubOrganizations...)
ref.Organization = path.Join(orgsWithSubGroups...)
ref.SubOrganizations = nil
return &ref
}

// GetTreeList retrieves list of tree files from gitprovider given the sha/branch
func (s *GitProviderService) GetTreeList(ctx context.Context, gp GitProvider, repoUrl string, sha string, path string, recursive bool) ([]*gitprovider.TreeEntry, error) {
repo, err := s.GetRepository(ctx, gp, repoUrl)
Expand Down
79 changes: 70 additions & 9 deletions cmd/clusters-service/pkg/git/git_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -183,26 +183,52 @@ func TestCreatePullRequestInGitLab(t *testing.T) {
gitlabHost := fmt.Sprintf("https://%s", os.Getenv("GIT_PROVIDER_HOSTNAME"))
client, err := gitlab.NewClient(os.Getenv("GITLAB_TOKEN"), gitlab.WithBaseURL(gitlabHost))
require.NoError(t, err)
// Create a repository using a name that doesn't exist already
repoName := fmt.Sprintf("%s-%03d", TestRepositoryNamePrefix, rand.Intn(1000))
repos, _, err := client.Projects.ListProjects(&gitlab.ListProjectsOptions{
Owned: gitlab.Bool(true),
})

repoName := TestRepositoryNamePrefix + "-group-test"

// Create a group using a name that doesn't exist already
groupName := fmt.Sprintf("%s-%03d", TestRepositoryNamePrefix, rand.Intn(1000))
groups, _, err := client.Groups.ListGroups(&gitlab.ListGroupsOptions{})
assert.NoError(t, err)
for findGitLabRepo(repos, repoName) != nil {
repoName = fmt.Sprintf("%s-%03d", TestRepositoryNamePrefix, rand.Intn(1000))
for findGitLabGroup(groups, groupName) != nil {
groupName = fmt.Sprintf("%s-%03d", TestRepositoryNamePrefix, rand.Intn(1000))
}

parentGroup, _, err := client.Groups.CreateGroup(&gitlab.CreateGroupOptions{
Path: gitlab.String(groupName),
Name: gitlab.String(groupName),
Visibility: gitlab.Visibility(gitlab.PrivateVisibility),
})
require.NoError(t, err)
t.Cleanup(func() {
_, err = client.Groups.DeleteGroup(parentGroup.ID)
require.NoError(t, err)
})

fooGroup, _, err := client.Groups.CreateGroup(&gitlab.CreateGroupOptions{
Path: gitlab.String("foo"),
Name: gitlab.String("foo group"),
foot marked this conversation as resolved.
Show resolved Hide resolved
ParentID: gitlab.Int(parentGroup.ID),
Visibility: gitlab.Visibility(gitlab.PrivateVisibility),
})
require.NoError(t, err)
t.Cleanup(func() {
_, err = client.Groups.DeleteGroup(fooGroup.ID)
require.NoError(t, err)
})

repo, _, err := client.Projects.CreateProject(&gitlab.CreateProjectOptions{
Name: gitlab.String(repoName),
MergeRequestsEnabled: gitlab.Bool(true),
Visibility: gitlab.Visibility(gitlab.PrivateVisibility),
InitializeWithReadme: gitlab.Bool(true),
NamespaceID: gitlab.Int(fooGroup.ID),
})
require.NoError(t, err)
defer func() {
t.Cleanup(func() {
_, err = client.Projects.DeleteProject(repo.ID)
require.NoError(t, err)
}()
})

s := git.NewGitProviderService(logr.Discard())
path := "management/cluster-01.yaml"
Expand Down Expand Up @@ -384,6 +410,29 @@ func TestGetGitProviderUrl(t *testing.T) {
assert.Equal(t, expected, repoURL)
}

func TestWithCombinedSubOrg(t *testing.T) {
ref, err := gitprovider.ParseOrgRepositoryURL("https://gitlab.com/org/sub1/sub2/sub3/repo")
assert.NoError(t, err)
newRef := git.WithCombinedSubOrgs(*ref)

// Where they are the still the same
assert.Equal(t, "repo", ref.RepositoryName)
assert.Equal(t, "repo", newRef.RepositoryName)

assert.Equal(t, "https://gitlab.com/org/sub1/sub2/sub3/repo.git", ref.GetCloneURL("https"))
assert.Equal(t, "https://gitlab.com/org/sub1/sub2/sub3/repo.git", newRef.GetCloneURL("https"))

assert.Equal(t, "https://gitlab.com/org/sub1/sub2/sub3/repo", ref.String())
assert.Equal(t, "https://gitlab.com/org/sub1/sub2/sub3/repo", newRef.String())

// Where they now differ
assert.Equal(t, "org", ref.Organization)
assert.Equal(t, "org/sub1/sub2/sub3", newRef.Organization)

assert.Equal(t, []string{"sub1", "sub2", "sub3"}, ref.SubOrganizations)
assert.Equal(t, []string(nil), newRef.SubOrganizations)
}

func findGitHubRepo(repos []*github.Repository, name string) *github.Repository {
if name == "" {
return nil
Expand All @@ -407,3 +456,15 @@ func findGitLabRepo(repos []*gitlab.Project, name string) *gitlab.Project {
}
return nil
}

func findGitLabGroup(groups []*gitlab.Group, name string) *gitlab.Group {
if name == "" {
return nil
}
for _, group := range groups {
if group.Name == name {
return group
}
}
return nil
}
7 changes: 0 additions & 7 deletions cmd/clusters-service/pkg/git/gitfakes/git_fake.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,6 @@ func (p *FakeGitProvider) WriteFilesToBranchAndCreatePullRequest(ctx context.Con
return &git.WriteFilesToBranchAndCreatePullRequestResponse{WebURL: p.url}, nil
}

func (p *FakeGitProvider) CloneRepoToTempDir(req git.CloneRepoToTempDirRequest) (*git.CloneRepoToTempDirResponse, error) {
if p.err != nil {
return nil, p.err
}
return &git.CloneRepoToTempDirResponse{Repo: p.repo}, nil
}

func (p *FakeGitProvider) GetRepository(ctx context.Context, gp git.GitProvider, url string) (gitprovider.OrgRepository, error) {
if p.err != nil {
return nil, p.err
Expand Down
5 changes: 1 addition & 4 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,6 @@ require (
google.golang.org/grpc v1.51.0
google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.1.0
google.golang.org/protobuf v1.28.1
gopkg.in/src-d/go-git.v4 v4.13.1
gotest.tools/v3 v3.1.0
helm.sh/helm/v3 v3.9.4
k8s.io/apiextensions-apiserver v0.25.4
Expand Down Expand Up @@ -222,7 +221,7 @@ require (
github.com/go-errors/errors v1.4.2 // indirect
github.com/go-git/gcfg v1.5.0 // indirect
github.com/go-git/go-billy/v5 v5.3.1 // indirect
github.com/go-git/go-git/v5 v5.4.2 // indirect
github.com/go-git/go-git/v5 v5.4.2
github.com/go-gorp/gorp/v3 v3.0.2 // indirect
github.com/go-logr/zapr v1.2.3 // indirect
github.com/go-openapi/jsonpointer v0.19.5 // indirect
Expand Down Expand Up @@ -297,7 +296,6 @@ require (
github.com/spf13/afero v1.8.2 // indirect
github.com/spf13/cast v1.5.0 // indirect
github.com/spf13/jwalterweatherman v1.1.0 // indirect
github.com/src-d/gcfg v1.4.0 // indirect
github.com/subosito/gotenv v1.4.1 // indirect
github.com/tomwright/dasel v1.22.1 // indirect
github.com/weaveworks/tf-controller/api v0.0.0-20221220150320-3d0f3743ccb4
Expand All @@ -321,7 +319,6 @@ require (
gopkg.in/inf.v0 v0.9.1 // indirect
gopkg.in/ini.v1 v1.67.0 // indirect
gopkg.in/square/go-jose.v2 v2.6.0 // indirect
gopkg.in/src-d/go-billy.v4 v4.3.2 // indirect
gopkg.in/warnings.v0 v0.1.2 // indirect
gopkg.in/yaml.v2 v2.4.0
k8s.io/apiserver v0.25.4 // indirect
Expand Down
17 changes: 0 additions & 17 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -134,8 +134,6 @@ github.com/Shopify/logrus-bugsnag v0.0.0-20171204204709-577dee27f20d/go.mod h1:H
github.com/StackExchange/wmi v1.2.1/go.mod h1:rcmrprowKIVzvc+NUiLncP2uuArMWLCbu9SBzvHz7e8=
github.com/acomagu/bufpipe v1.0.3 h1:fxAGrHZTgQ9w5QqVItgzwj235/uYZYgbXitB+dLupOk=
github.com/acomagu/bufpipe v1.0.3/go.mod h1:mxdxdup/WdsKVreO5GpW4+M/1CE2sMG4jeGJ2sYmHc4=
github.com/alcortesm/tgz v0.0.0-20161220082320-9c5fe88206d7 h1:uSoVVbwJiQipAclBbw+8quDsfcvFjOpI5iCf4p/cqCs=
github.com/alcortesm/tgz v0.0.0-20161220082320-9c5fe88206d7/go.mod h1:6zEj6s6u/ghQa61ZWa/C2Aw3RkjiTBOix7dkqa1VLIs=
github.com/alecthomas/assert v0.0.0-20170929043011-405dbfeb8e38 h1:smF2tmSOzy2Mm+0dGI2AIUHY+w0BUc+4tn40djz7+6U=
github.com/alecthomas/assert v0.0.0-20170929043011-405dbfeb8e38/go.mod h1:r7bzyVFMNntcxPZXK3/+KdruV1H5KSlyVY0gc+NgInI=
github.com/alecthomas/chroma v0.9.2 h1:yU1sE2+TZbLIQPMk30SolL2Hn53SR/Pv750f7qZ/XMs=
Expand Down Expand Up @@ -874,7 +872,6 @@ github.com/karrick/godirwalk v1.16.1 h1:DynhcF+bztK8gooS0+NDJFrdNZjJ3gzVzC545UNA
github.com/karrick/godirwalk v1.16.1/go.mod h1:j4mkqPuvaLI8mp1DroR3P6ad7cyYd4c1qeJ3RV7ULlk=
github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51 h1:Z9n2FFNUXsshfwJMBgNA0RU6/i7WVaAegv3PtuIHPMs=
github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51/go.mod h1:CzGEWj7cYgsdH8dAjBGEr58BoE7ScuLd+fwFZ44+/x8=
github.com/kevinburke/ssh_config v0.0.0-20190725054713-01f96b0aa0cd/go.mod h1:CT57kijsi8u/K/BOFA39wgDQJ9CxiF4nAY/ojJ6r6mM=
github.com/kevinburke/ssh_config v0.0.0-20201106050909-4977a11b4351/go.mod h1:CT57kijsi8u/K/BOFA39wgDQJ9CxiF4nAY/ojJ6r6mM=
github.com/kevinburke/ssh_config v1.2.0 h1:x584FjTGwHzMwvHx18PXxbBVzfnxogHaAReU4gf13a4=
github.com/kevinburke/ssh_config v1.2.0/go.mod h1:CT57kijsi8u/K/BOFA39wgDQJ9CxiF4nAY/ojJ6r6mM=
Expand Down Expand Up @@ -904,7 +901,6 @@ github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfn
github.com/kr/pretty v0.3.0 h1:WgNl7dwNpEZ6jJ9k1snq4pZsg7DOEN8hP9Xw0Tsjwk0=
github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ=
github.com/kr/pty v1.1.5/go.mod h1:9r2w37qlBe7rQ6e1fg1S/9xpWHSnaqNdHD3WcMdbPDA=
github.com/kr/pty v1.1.8/go.mod h1:O1sed60cT9XZ5uDucP5qwvh+TE3NnUj51EiZO/lmSfw=
github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=
github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY=
github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE=
Expand Down Expand Up @@ -1152,7 +1148,6 @@ github.com/otiai10/mint v1.3.3 h1:7JgpsBaN0uMkyju4tbYHu0mnM55hNKVYLsXmwr15NQI=
github.com/otiai10/mint v1.3.3/go.mod h1:/yxELlJQ0ufhjUwhshSj+wFjZ78CnZ48/1wtmBH1OTc=
github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc=
github.com/pborman/uuid v1.2.0/go.mod h1:X/NO0urCmaxf9VXbdlT7C2Yzkj2IKimNn4k+gtPdI/k=
github.com/pelletier/go-buffruneio v0.2.0/go.mod h1:JkE26KsDizTr40EUHkXVtNPvgGtbSNq5BcowyYOWdKo=
github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic=
github.com/pelletier/go-toml v1.9.3/go.mod h1:u1nR/EPcESfeI/szUZKdtJ0xRNbUoANCkoOuaOx1Y+c=
github.com/pelletier/go-toml v1.9.4/go.mod h1:u1nR/EPcESfeI/szUZKdtJ0xRNbUoANCkoOuaOx1Y+c=
Expand Down Expand Up @@ -1324,8 +1319,6 @@ github.com/spf13/viper v1.8.1/go.mod h1:o0Pch8wJ9BVSWGQMbra6iw0oQ5oktSIBaujf1rJH
github.com/spf13/viper v1.9.0/go.mod h1:+i6ajR7OX2XaiBkrcZJFK21htRk7eDeLg7+O6bhUPP4=
github.com/spf13/viper v1.13.0 h1:BWSJ/M+f+3nmdz9bxB+bWX28kkALN2ok11D0rSo8EJU=
github.com/spf13/viper v1.13.0/go.mod h1:Icm2xNL3/8uyh/wFuB1jI7TiTNKp8632Nwegu+zgdYw=
github.com/src-d/gcfg v1.4.0 h1:xXbNR5AlLSA315x2UO+fTSSAXCDf+Ar38/6oyGbDKQ4=
github.com/src-d/gcfg v1.4.0/go.mod h1:p/UMsR43ujA89BJY9duynAwIpvqEujIH/jFlfL7jWoI=
github.com/ssgreg/nlreturn/v2 v2.2.1/go.mod h1:E/iiPB78hV7Szg2YfRgyIrk1AD6JVMTRkkxBiELzh2I=
github.com/stoewer/go-strcase v1.2.0/go.mod h1:IBiWB2sKIp3wVVQ3Y035++gc+knqhUQag1KpM8ahLw8=
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
Expand Down Expand Up @@ -1402,7 +1395,6 @@ github.com/weaveworks/weave-gitops-enterprise-credentials v0.0.2 h1:7jeiQehqmI4d
github.com/weaveworks/weave-gitops-enterprise-credentials v0.0.2/go.mod h1:6PMYg+VtSNePnP7EXyNG+/hNRNZ3r0mQtolIZU4s/J0=
github.com/xanzy/go-gitlab v0.77.0 h1:UrbGlxkWVCbkpa6Fk6cM8ARh+rLACWemkJnsawT7t98=
github.com/xanzy/go-gitlab v0.77.0/go.mod h1:d/a0vswScO7Agg1CZNz15Ic6SSvBG9vfw8egL99t4kA=
github.com/xanzy/ssh-agent v0.2.1/go.mod h1:mLlQY/MoOhWBj+gOGMQkOeiEvkx+8pJSI+0Bx9h2kr4=
github.com/xanzy/ssh-agent v0.3.0/go.mod h1:3s9xbODqPuuhK9JV1R321M/FlMZSBvE5aY6eAcqrDh0=
github.com/xanzy/ssh-agent v0.3.2 h1:eKj4SX2Fe7mui28ZgnFW5fmTz1EIr7ugo5s6wDxdHBM=
github.com/xanzy/ssh-agent v0.3.2/go.mod h1:6dzNDKs0J9rVPHPhaGCukekBHKqfl+L3KghI1Bc68Uw=
Expand Down Expand Up @@ -1501,7 +1493,6 @@ golang.org/x/crypto v0.0.0-20190325154230-a5d413f7728c/go.mod h1:djNgcEr1/C05ACk
golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
golang.org/x/crypto v0.0.0-20190611184440-5c40567a22f8/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
golang.org/x/crypto v0.0.0-20190701094942-4def268fd1a4/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
golang.org/x/crypto v0.0.0-20190820162420-60c769a6c586/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
golang.org/x/crypto v0.0.0-20190911031432-227b76d455e7/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
golang.org/x/crypto v0.0.0-20190923035154-9ee001bba392/go.mod h1:/lpIB1dKB+9EgE3H3cr1v9wB50oz8l4C4h62xy7jSTY=
Expand Down Expand Up @@ -1682,7 +1673,6 @@ golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5h
golang.org/x/sys v0.0.0-20181122145206-62eef0e2fa9b/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20181205085412-a5c9d58dba9a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20190221075227-b4e8571b14e0/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20190321052220-f7bb7a8bee54/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
Expand Down Expand Up @@ -1832,7 +1822,6 @@ golang.org/x/tools v0.0.0-20190606124116-d0a3d012864b/go.mod h1:/rFqwRUd4F7ZHNgw
golang.org/x/tools v0.0.0-20190614205625-5aca471b1d59/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc=
golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc=
golang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc=
golang.org/x/tools v0.0.0-20190729092621-ff9f1409240a/go.mod h1:jcCCGcm9btYwXyDqrUWc6MKQKKGJCWEQ3AfLSRIbEuI=
golang.org/x/tools v0.0.0-20190816200558-6889da9d5479/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
golang.org/x/tools v0.0.0-20190907020128-2ca718005c18/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
golang.org/x/tools v0.0.0-20190910044552-dd2b5c81c578/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
Expand Down Expand Up @@ -2118,12 +2107,6 @@ gopkg.in/square/go-jose.v2 v2.2.2/go.mod h1:M9dMgbHiYLoDGQrXy7OpJDJWiKiU//h+vD76
gopkg.in/square/go-jose.v2 v2.5.1/go.mod h1:M9dMgbHiYLoDGQrXy7OpJDJWiKiU//h+vD76mk0e1AI=
gopkg.in/square/go-jose.v2 v2.6.0 h1:NGk74WTnPKBNUhNzQX7PYcTLUjoq7mzKk2OKbvwk2iI=
gopkg.in/square/go-jose.v2 v2.6.0/go.mod h1:M9dMgbHiYLoDGQrXy7OpJDJWiKiU//h+vD76mk0e1AI=
gopkg.in/src-d/go-billy.v4 v4.3.2 h1:0SQA1pRztfTFx2miS8sA97XvooFeNOmvUenF4o0EcVg=
gopkg.in/src-d/go-billy.v4 v4.3.2/go.mod h1:nDjArDMp+XMs1aFAESLRjfGSgfvoYN0hDfzEk0GjC98=
gopkg.in/src-d/go-git-fixtures.v3 v3.5.0 h1:ivZFOIltbce2Mo8IjzUHAFoq/IylO9WHhNOAJK+LsJg=
gopkg.in/src-d/go-git-fixtures.v3 v3.5.0/go.mod h1:dLBcvytrw/TYZsNTWCnkNF2DSIlzWYqTe3rJR56Ac7g=
gopkg.in/src-d/go-git.v4 v4.13.1 h1:SRtFyV8Kxc0UP7aCHcijOMQGPxHSmMOPrzulQWolkYE=
gopkg.in/src-d/go-git.v4 v4.13.1/go.mod h1:nx5NYcxdKxq5fpltdHnPa2Exj4Sx0EclMWZQbYDu2z8=
gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ=
gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw=
gopkg.in/warnings.v0 v0.1.2 h1:wFXVbFY8DY5/xOe1ECiWdKCzZlxgshcYVNkBHstARME=
Expand Down