From 08eb91f716621d64df4ad52a1c970ac605112ba7 Mon Sep 17 00:00:00 2001 From: Michael Spiegel Date: Tue, 8 May 2018 10:20:27 -0400 Subject: [PATCH 1/3] Prepare next release From 63004f7525051d9f6ec5c71e8debf6987d7c42d1 Mon Sep 17 00:00:00 2001 From: Jon Bodner Date: Thu, 19 Mar 2020 15:15:03 -0400 Subject: [PATCH 2/3] update versions of dependencies. Fix to use latest github APIs. --- .gitignore | 1 + admin/browse.go | 2 +- api/admin.go | 4 +- api/json.go | 2 +- api/orgs.go | 2 +- api/orgs_test.go | 2 +- api/repos.go | 2 +- api/slack.go | 10 +- api/user_test.go | 2 +- cache/cache.go | 2 +- cmd/integration/main.go | 2 +- exterror/exterror.go | 2 +- go.mod | 80 +++---- go.sum | 275 ++++++++++++++++------ logstats/logstats.go | 2 +- main.go | 2 +- migration/migration.go | 2 +- model/org.go | 8 +- model/repo.go | 1 - model/scopepolicy.go | 2 +- model/tag.go | 2 +- notifier/github/github.go | 2 +- notifier/notifier.go | 2 +- notifier/slack/slack.go | 2 +- remote/github/github.go | 30 ++- remote/github/github_integration_test.go | 8 +- remote/github/paging.go | 2 +- remote/github/utils.go | 4 +- remote/github/walk.go | 6 +- router/middleware/access/access.go | 2 +- router/middleware/cache.go | 4 +- router/middleware/exterror.go | 2 +- router/middleware/logrequests.go | 2 +- router/middleware/recovery.go | 2 +- router/middleware/session/capabilities.go | 2 +- router/middleware/store.go | 2 +- router/router.go | 2 +- set/lowerset.go | 8 +- set/lowerset_test.go | 2 +- set/set.go | 4 +- store/context.go | 2 +- store/datastore/datastore.go | 2 +- store/datastore/datastore_test.go | 2 +- store/datastore/users_test.go | 2 +- store/migration/migration_gen.go | 70 +++--- strings/lowercase/lowercase_test.go | 2 +- usage/usage.go | 2 +- usage/usage_test.go | 6 +- web/approval.go | 2 +- web/github_create.go | 4 +- web/index.go | 2 +- web/login.go | 2 +- web/merge.go | 2 +- web/notification.go | 2 +- web/pr_hook.go | 2 +- web/static/static_gen.go | 40 ++-- web/status_hook.go | 2 +- web/tag.go | 4 +- web/template/template_gen.go | 14 +- 59 files changed, 387 insertions(+), 272 deletions(-) diff --git a/.gitignore b/.gitignore index ebeaa25..6122f25 100644 --- a/.gitignore +++ b/.gitignore @@ -7,3 +7,4 @@ checks-out.sqlite .vscode report.out report.xml +*.iml diff --git a/admin/browse.go b/admin/browse.go index 35c6ed9..b297f6b 100644 --- a/admin/browse.go +++ b/admin/browse.go @@ -22,11 +22,11 @@ import ( "context" "fmt" - jsonpointer "github.com/mattn/go-jsonpointer" "github.com/capitalone/checks-out/envvars" "github.com/capitalone/checks-out/hjson" "github.com/capitalone/checks-out/model" "github.com/capitalone/checks-out/remote" + jsonpointer "github.com/mattn/go-jsonpointer" ) var configFileName = fmt.Sprintf(".%s", envvars.Env.Branding.Name) diff --git a/api/admin.go b/api/admin.go index 329d02d..eb93d74 100644 --- a/api/admin.go +++ b/api/admin.go @@ -32,8 +32,8 @@ import ( "github.com/capitalone/checks-out/shared/httputil" "github.com/capitalone/checks-out/store" - "github.com/Sirupsen/logrus" "github.com/gin-gonic/gin" + "github.com/sirupsen/logrus" ) func unauthorizedError() error { @@ -126,7 +126,7 @@ func AdminDeleteRepo(c *gin.Context) { httputil.GetURL(c.Request), ) - user, err := store.GetUser(c, repo.UserID) + user, err := store.GetUser(c, repo.UserID) if err != nil { msg := fmt.Sprintf("Deleting repository %s", name) c.Error(exterror.Append(err, msg)) diff --git a/api/json.go b/api/json.go index bf7bccb..925bf1c 100644 --- a/api/json.go +++ b/api/json.go @@ -22,8 +22,8 @@ import ( "bytes" "encoding/json" - log "github.com/Sirupsen/logrus" "github.com/gin-gonic/gin" + log "github.com/sirupsen/logrus" ) func IndentedJSON(c *gin.Context, code int, obj interface{}) { diff --git a/api/orgs.go b/api/orgs.go index 3116ba0..bd04362 100644 --- a/api/orgs.go +++ b/api/orgs.go @@ -31,9 +31,9 @@ import ( "github.com/capitalone/checks-out/shared/token" "github.com/capitalone/checks-out/store" - "github.com/Sirupsen/logrus" "github.com/gin-gonic/gin" "github.com/pkg/errors" + "github.com/sirupsen/logrus" ) func collectAllOrgs(c *gin.Context) ([]*model.GitHubOrg, set.Set, error) { diff --git a/api/orgs_test.go b/api/orgs_test.go index 371cb3d..31dba69 100644 --- a/api/orgs_test.go +++ b/api/orgs_test.go @@ -33,10 +33,10 @@ import ( "github.com/capitalone/checks-out/router/middleware" "github.com/capitalone/checks-out/store" - "github.com/Sirupsen/logrus" "github.com/franela/goblin" "github.com/gin-gonic/gin" "github.com/pkg/errors" + "github.com/sirupsen/logrus" ) type mockCache struct { diff --git a/api/repos.go b/api/repos.go index d4df911..c74ca03 100644 --- a/api/repos.go +++ b/api/repos.go @@ -31,9 +31,9 @@ import ( "github.com/capitalone/checks-out/shared/token" "github.com/capitalone/checks-out/store" - "github.com/Sirupsen/logrus" "github.com/gin-gonic/gin" "github.com/pkg/errors" + "github.com/sirupsen/logrus" ) // GetAllReposCount gets the count of all repositories managed by Checks-Out. diff --git a/api/slack.go b/api/slack.go index 9e2b16a..bf4e5a6 100644 --- a/api/slack.go +++ b/api/slack.go @@ -19,13 +19,13 @@ See the License for the specific language governing permissions and limitations package api import ( - "github.com/gin-gonic/gin" - "github.com/capitalone/checks-out/store" - "github.com/capitalone/checks-out/exterror" - "fmt" "encoding/json" - "io/ioutil" + "fmt" + "github.com/capitalone/checks-out/exterror" "github.com/capitalone/checks-out/router/middleware/session" + "github.com/capitalone/checks-out/store" + "github.com/gin-gonic/gin" + "io/ioutil" ) type UrlHolder struct { diff --git a/api/user_test.go b/api/user_test.go index bb9926d..13aa732 100644 --- a/api/user_test.go +++ b/api/user_test.go @@ -28,9 +28,9 @@ import ( "github.com/capitalone/checks-out/model" - "github.com/Sirupsen/logrus" "github.com/franela/goblin" "github.com/gin-gonic/gin" + "github.com/sirupsen/logrus" ) func TestUsers(t *testing.T) { diff --git a/cache/cache.go b/cache/cache.go index 9fa0415..4fbca7f 100644 --- a/cache/cache.go +++ b/cache/cache.go @@ -22,8 +22,8 @@ import ( "context" "time" - "github.com/koding/cache" "github.com/capitalone/checks-out/envvars" + "github.com/koding/cache" ) type Cache interface { diff --git a/cmd/integration/main.go b/cmd/integration/main.go index 4bb3751..6e2fe9f 100644 --- a/cmd/integration/main.go +++ b/cmd/integration/main.go @@ -33,8 +33,8 @@ import ( "github.com/capitalone/checks-out/envvars" gh "github.com/capitalone/checks-out/remote/github" - log "github.com/Sirupsen/logrus" "github.com/google/go-github/github" + log "github.com/sirupsen/logrus" "golang.org/x/oauth2" ) diff --git a/exterror/exterror.go b/exterror/exterror.go index b0d8363..7348cd6 100644 --- a/exterror/exterror.go +++ b/exterror/exterror.go @@ -23,8 +23,8 @@ import ( "fmt" "reflect" - log "github.com/Sirupsen/logrus" "github.com/mspiegel/go-multierror" + log "github.com/sirupsen/logrus" ) type ExtError struct { diff --git a/go.mod b/go.mod index f09f1a5..7d2b550 100644 --- a/go.mod +++ b/go.mod @@ -1,52 +1,42 @@ module github.com/capitalone/checks-out +go 1.14 + require ( - github.com/BurntSushi/toml v0.3.0 // indirect - github.com/Sirupsen/logrus v0.11.5 - github.com/davecgh/go-spew v1.1.0 // indirect - github.com/dgrijalva/jwt-go v3.1.0+incompatible + github.com/dgrijalva/jwt-go v3.2.0+incompatible github.com/elazarl/go-bindata-assetfs v1.0.0 - github.com/franela/goblin v0.0.0-20170821161553-b962efd4bb2a - github.com/gin-contrib/sse v0.0.0-20170109093832-22d885f9ecc7 // indirect - github.com/gin-gonic/gin v0.0.0-20170702092826-d459835d2b07 - github.com/go-sql-driver/mysql v1.3.0 - github.com/golang/protobuf v0.0.0-20170920220647-130e6b02ab05 // indirect - github.com/google/go-github v0.0.0-20180723152927-e1be32f26e66 - github.com/google/go-querystring v0.0.0-20170111101155-53e6ce116135 // indirect - github.com/hashicorp/errwrap v0.0.0-20141028054710-7554cd9344ce // indirect - github.com/hashicorp/go-version v0.0.0-20170914154128-fc61389e27c7 - github.com/hjson/hjson-go v0.2.3 + github.com/franela/goblin v0.0.0-20200105215937-c9ffbefa60db + github.com/gin-gonic/gin v1.5.0 + github.com/go-playground/universal-translator v0.17.0 // indirect + github.com/go-sql-driver/mysql v1.5.0 + github.com/golang/protobuf v1.3.5 // indirect + github.com/google/go-github v17.0.0+incompatible + github.com/google/go-github/v30 v30.0.0 + github.com/hashicorp/go-version v1.2.0 + github.com/hjson/hjson-go v3.0.1+incompatible github.com/ianschenck/envflag v0.0.0-20140720210342-9111d830d133 - github.com/joho/godotenv v1.2.0 + github.com/joho/godotenv v1.3.0 + github.com/json-iterator/go v1.1.9 // indirect github.com/koding/cache v0.0.0-20161222233015-e8a81b0b3f20 - github.com/kr/pretty v0.1.0 // indirect - github.com/lib/pq v0.0.0-20171019223007-456514e2defe - github.com/mailru/easyjson v0.0.0-20180823135443-60711f1a8329 // indirect - github.com/mattn/go-isatty v0.0.3 // indirect - github.com/mattn/go-jsonpointer v0.0.0-20170427002117-a39417dc2a77 - github.com/mattn/go-sqlite3 v1.2.0 - github.com/mspiegel/go-multierror v0.0.0-20170309222903-065aa648c994 - github.com/pelletier/go-toml v1.0.1 - github.com/philhofer/fwd v1.0.0 // indirect - github.com/pkg/errors v0.8.0 - github.com/pmezard/go-difflib v1.0.0 // indirect - github.com/pquerna/ffjson v0.0.0-20180717144149-af8b230fcd20 // indirect - github.com/rubenv/sql-migrate v0.0.0-20170824124545-79fe99e24311 - github.com/russross/meddler v0.0.0-20170319163028-9515f6b01c15 - github.com/stretchr/objx v0.0.0-20150928122152-1a9d0bb9f541 // indirect - github.com/stretchr/testify v1.1.4 - github.com/tinylib/msgp v1.0.2 // indirect - github.com/ugorji/go v0.0.0-20171019201919-bdcc60b419d1 // indirect - github.com/ziutek/mymysql v1.5.4 // indirect - golang.org/x/net v0.0.0-20171019164906-aabf50738bcd // indirect - golang.org/x/oauth2 v0.0.0-20170928010508-bb50c06baba3 - golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f // indirect - golang.org/x/sys v0.0.0-20171017063910-8dbc5d05d6ed // indirect - google.golang.org/appengine v1.0.0 // indirect - gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 // indirect - gopkg.in/go-playground/assert.v1 v1.2.1 // indirect - gopkg.in/go-playground/validator.v8 v8.18.2 // indirect - gopkg.in/gorp.v1 v1.7.1 // indirect - gopkg.in/mgo.v2 v2.0.0-20160818020120-3f83fa500528 // indirect - gopkg.in/yaml.v2 v2.0.0-20170812160011-eb3733d160e7 // indirect + github.com/leodido/go-urn v1.2.0 // indirect + github.com/lib/pq v1.3.0 + github.com/mattn/go-isatty v0.0.12 // indirect + github.com/mattn/go-jsonpointer v0.0.1 + github.com/mattn/go-sqlite3 v2.0.3+incompatible + github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect + github.com/modern-go/reflect2 v1.0.1 // indirect + github.com/mspiegel/go-multierror v0.0.0-20171123200149-ea68e724609a + github.com/pelletier/go-toml v1.6.0 + github.com/pkg/errors v0.9.1 + github.com/rubenv/sql-migrate v0.0.0-20200212082348-64f95ea68aa3 + github.com/russross/meddler v0.0.0-20191023082315-51a972bb8fb2 + github.com/sirupsen/logrus v1.4.2 + github.com/stretchr/testify v1.4.0 + golang.org/x/crypto v0.0.0-20200317142112-1b76d66859c6 // indirect + golang.org/x/net v0.0.0-20200301022130-244492dfa37a // indirect + golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d + golang.org/x/sys v0.0.0-20200317113312-5766fd39f98d // indirect + gopkg.in/go-playground/validator.v9 v9.31.0 // indirect + gopkg.in/mgo.v2 v2.0.0-20190816093944-a6b53ec6cb22 // indirect + gopkg.in/yaml.v2 v2.2.8 // indirect ) diff --git a/go.sum b/go.sum index 76fb1eb..879b1e7 100644 --- a/go.sum +++ b/go.sum @@ -1,99 +1,222 @@ -github.com/BurntSushi/toml v0.3.0 h1:e1/Ivsx3Z0FVTV0NSOv/aVgbUWyQuzj7DDnFblkRvsY= -github.com/BurntSushi/toml v0.3.0/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= -github.com/Sirupsen/logrus v0.11.5 h1:aIMrrsnipdTlAieMe7FC/iiuJ0+ELiXCT4YiVQiK9j8= -github.com/Sirupsen/logrus v0.11.5/go.mod h1:rmk17hk6i8ZSAJkSDa7nOxamrG+SP4P0mm+DAvExv4U= +cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= +github.com/BurntSushi/toml v0.3.1 h1:WXkYYl6Yr3qBf1K79EBnL4mak0OimBfB0XUf9Vl28OQ= +github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= +github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8= +github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= +github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= +github.com/coreos/etcd v3.3.10+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= +github.com/coreos/go-etcd v2.0.0+incompatible/go.mod h1:Jez6KQU2B/sWsbdaef3ED8NzMklzPG4d5KIOhIy30Tk= +github.com/coreos/go-semver v0.2.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= +github.com/cpuguy83/go-md2man v1.0.10/go.mod h1:SmD6nW6nTyfqj6ABTjUi3V3JVMnlJmwcJI5acqYI6dE= github.com/davecgh/go-spew v1.1.0 h1:ZDRjVQ15GmhC3fiQ8ni8+OwkZQO4DARzQgrnXU1Liz8= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/dgrijalva/jwt-go v3.1.0+incompatible h1:FFziAwDQQ2dz1XClWMkwvukur3evtZx7x/wMHKM1i20= -github.com/dgrijalva/jwt-go v3.1.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= +github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= +github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/denisenkom/go-mssqldb v0.0.0-20191001013358-cfbb681360f0/go.mod h1:xbL0rPBG9cCiLr28tMa8zpbdarY27NDyej4t/EjAShU= +github.com/dgrijalva/jwt-go v3.2.0+incompatible h1:7qlOGliEKZXTDg6OTjfoBKDXWrumCAMpl/TFQ4/5kLM= +github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= github.com/elazarl/go-bindata-assetfs v1.0.0 h1:G/bYguwHIzWq9ZoyUQqrjTmJbbYn3j3CKKpKinvZLFk= github.com/elazarl/go-bindata-assetfs v1.0.0/go.mod h1:v+YaWX3bdea5J/mo8dSETolEo7R71Vk1u8bnjau5yw4= -github.com/franela/goblin v0.0.0-20170821161553-b962efd4bb2a h1:k88PAvmBlL+52JnuKfBrJBtDVecRdaSmXVyynzuhxEQ= -github.com/franela/goblin v0.0.0-20170821161553-b962efd4bb2a/go.mod h1:7dvUGVsVBjqR7JHJk0brhHOZYGmfBYOrK0ZhYMEtBr4= -github.com/gin-contrib/sse v0.0.0-20170109093832-22d885f9ecc7 h1:AzN37oI0cOS+cougNAV9szl6CVoj2RYwzS3DpUQNtlY= -github.com/gin-contrib/sse v0.0.0-20170109093832-22d885f9ecc7/go.mod h1:VJ0WA2NBN22VlZ2dKZQPAPnyWw5XTlK1KymzLKsr59s= -github.com/gin-gonic/gin v0.0.0-20170702092826-d459835d2b07 h1:cZPJWzd2oNeoS0oJM2TlN9rl0OnCgUr10gC8Q4mH+6M= -github.com/gin-gonic/gin v0.0.0-20170702092826-d459835d2b07/go.mod h1:7cKuhb5qV2ggCFctp2fJQ+ErvciLZrIeoOSOm6mUr7Y= -github.com/go-sql-driver/mysql v1.3.0 h1:pgwjLi/dvffoP9aabwkT3AKpXQM93QARkjFhDDqC1UE= -github.com/go-sql-driver/mysql v1.3.0/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG5ZlKdlhCg5w= -github.com/golang/protobuf v0.0.0-20170920220647-130e6b02ab05 h1:Kesru7U6Mhpf/x7rthxAKnr586VFmoE2NdEvkOKvfjg= -github.com/golang/protobuf v0.0.0-20170920220647-130e6b02ab05/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/google/go-github v0.0.0-20180723152927-e1be32f26e66 h1:aWetrL1GmzNv07hFf/s1djYTcIsLqSCFCLPj9L7+zME= -github.com/google/go-github v0.0.0-20180723152927-e1be32f26e66/go.mod h1:zLgOLi98H3fifZn+44m+umXrS52loVEgC2AApnigrVQ= -github.com/google/go-querystring v0.0.0-20170111101155-53e6ce116135 h1:zLTLjkaOFEFIOxY5BWLFLwh+cL8vOBW4XJ2aqLE/Tf0= -github.com/google/go-querystring v0.0.0-20170111101155-53e6ce116135/go.mod h1:odCYkC5MyYFN7vkCjXpyrEuKhc/BUO6wN/zVPAxq5ck= -github.com/hashicorp/errwrap v0.0.0-20141028054710-7554cd9344ce h1:prjrVgOk2Yg6w+PflHoszQNLTUh4kaByUcEWM/9uin4= -github.com/hashicorp/errwrap v0.0.0-20141028054710-7554cd9344ce/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= -github.com/hashicorp/go-version v0.0.0-20170914154128-fc61389e27c7 h1:Tijq+ZHupzK8WfomfH2s5dpKkpZd2TcN2i1LDbzWbwk= -github.com/hashicorp/go-version v0.0.0-20170914154128-fc61389e27c7/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= -github.com/hjson/hjson-go v0.2.3 h1:KhG7/PSxTibbYOzFso5FoiX2gWePcANaCsvM1WE/bTo= -github.com/hjson/hjson-go v0.2.3/go.mod h1:qsetwF8NlsTsOTwZTApNlTCerV+b2GjYRRcIk4JMFio= +github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= +github.com/franela/goblin v0.0.0-20200105215937-c9ffbefa60db h1:gb2Z18BhTPJPpLQWj4T+rfKHYCHxRHCtRxhKKjRidVw= +github.com/franela/goblin v0.0.0-20200105215937-c9ffbefa60db/go.mod h1:7dvUGVsVBjqR7JHJk0brhHOZYGmfBYOrK0ZhYMEtBr4= +github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= +github.com/gin-contrib/sse v0.1.0 h1:Y/yl/+YNO8GZSjAhjMsSuLt29uWRFHdHYUb5lYOV9qE= +github.com/gin-contrib/sse v0.1.0/go.mod h1:RHrZQHXnP2xjPF+u1gW/2HnVO7nvIa9PG3Gm+fLHvGI= +github.com/gin-gonic/gin v1.5.0 h1:fi+bqFAx/oLK54somfCtEZs9HeH1LHVoEPUgARpTqyc= +github.com/gin-gonic/gin v1.5.0/go.mod h1:Nd6IXA8m5kNZdNEHMBd93KT+mdY3+bewLgRvmCsR2Do= +github.com/go-playground/locales v0.12.1 h1:2FITxuFt/xuCNP1Acdhv62OzaCiviiE4kotfhkmOqEc= +github.com/go-playground/locales v0.12.1/go.mod h1:IUMDtCfWo/w/mtMfIE/IG2K+Ey3ygWanZIBtBW0W2TM= +github.com/go-playground/locales v0.13.0 h1:HyWk6mgj5qFqCT5fjGBuRArbVDfE4hi8+e8ceBS/t7Q= +github.com/go-playground/locales v0.13.0/go.mod h1:taPMhCMXrRLJO55olJkUXHZBHCxTMfnGwq/HNwmWNS8= +github.com/go-playground/universal-translator v0.16.0 h1:X++omBR/4cE2MNg91AoC3rmGrCjJ8eAeUP/K/EKx4DM= +github.com/go-playground/universal-translator v0.16.0/go.mod h1:1AnU7NaIRDWWzGEKwgtJRd2xk99HeFyHw3yid4rvQIY= +github.com/go-playground/universal-translator v0.17.0 h1:icxd5fm+REJzpZx7ZfpaD876Lmtgy7VtROAbHHXk8no= +github.com/go-playground/universal-translator v0.17.0/go.mod h1:UkSxE5sNxxRwHyU+Scu5vgOQjsIJAF8j9muTVoKLVtA= +github.com/go-sql-driver/mysql v1.4.1/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG5ZlKdlhCg5w= +github.com/go-sql-driver/mysql v1.5.0 h1:ozyZYNQW3x3HtqT1jira07DN2PArx2v7/mN66gGcHOs= +github.com/go-sql-driver/mysql v1.5.0/go.mod h1:DCzpHaOWr8IXmIStZouvnhqoel9Qv2LBy8hT2VhHyBg= +github.com/gobuffalo/envy v1.7.0/go.mod h1:n7DRkBerg/aorDM8kbduw5dN3oXGswK5liaSCx4T5NI= +github.com/gobuffalo/envy v1.7.1 h1:OQl5ys5MBea7OGCdvPbBJWRgnhC/fGona6QKfvFeau8= +github.com/gobuffalo/envy v1.7.1/go.mod h1:FurDp9+EDPE4aIUS3ZLyD+7/9fpx7YRt/ukY6jIHf0w= +github.com/gobuffalo/logger v1.0.1 h1:ZEgyRGgAm4ZAhAO45YXMs5Fp+bzGLESFewzAVBMKuTg= +github.com/gobuffalo/logger v1.0.1/go.mod h1:2zbswyIUa45I+c+FLXuWl9zSWEiVuthsk8ze5s8JvPs= +github.com/gobuffalo/packd v0.3.0 h1:eMwymTkA1uXsqxS0Tpoop3Lc0u3kTfiMBE6nKtQU4g4= +github.com/gobuffalo/packd v0.3.0/go.mod h1:zC7QkmNkYVGKPw4tHpBQ+ml7W/3tIebgeo1b36chA3Q= +github.com/gobuffalo/packr/v2 v2.7.1 h1:n3CIW5T17T8v4GGK5sWXLVWJhCz7b5aNLSxW6gYim4o= +github.com/gobuffalo/packr/v2 v2.7.1/go.mod h1:qYEvAazPaVxy7Y7KR0W8qYEE+RymX74kETFqjFoFlOc= +github.com/golang-sql/civil v0.0.0-20190719163853-cb61b32ac6fe/go.mod h1:8vg3r2VgvsThLBIFL93Qb5yWzgyZWhEmBwUJWevAkK0= +github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.3.5 h1:F768QJ1E9tib+q5Sc8MkdJi1RxLTbRcTf8LJV56aRls= +github.com/golang/protobuf v1.3.5/go.mod h1:6O5/vntMXwX2lRkT1hjjk0nAC1IDOTvTlVgjlRvqsdk= +github.com/google/go-github v17.0.0+incompatible h1:N0LgJ1j65A7kfXrZnUDaYCs/Sf4rEjNlfyDHW9dolSY= +github.com/google/go-github v17.0.0+incompatible/go.mod h1:zLgOLi98H3fifZn+44m+umXrS52loVEgC2AApnigrVQ= +github.com/google/go-github/v30 v30.0.0 h1:5UgIxLcf4zolLP8QpFcrSku0G1Y/p5+WChWL11dFlnQ= +github.com/google/go-github/v30 v30.0.0/go.mod h1:n8jBpHl45a/rlBUtRJMOG4GhNADUQFEufcolZ95JfU8= +github.com/google/go-querystring v1.0.0 h1:Xkwi/a1rcvNg1PPYe5vI8GbeBY/jrVuDX5ASuANWTrk= +github.com/google/go-querystring v1.0.0/go.mod h1:odCYkC5MyYFN7vkCjXpyrEuKhc/BUO6wN/zVPAxq5ck= +github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= +github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= +github.com/hashicorp/go-multierror v1.0.0/go.mod h1:dHtQlpGsu+cZNNAkkCN/P3hoUDHhCYQXV3UM06sGGrk= +github.com/hashicorp/go-version v1.2.0 h1:3vNe/fWF5CBgRIguda1meWhsZHy3m8gCJ5wx+dIzX/E= +github.com/hashicorp/go-version v1.2.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= +github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= +github.com/hjson/hjson-go v3.0.1+incompatible h1:JwOXblcMiBbiWue7iPkoFK9oXSnW8n+qXh/0Fio6TCo= +github.com/hjson/hjson-go v3.0.1+incompatible/go.mod h1:qsetwF8NlsTsOTwZTApNlTCerV+b2GjYRRcIk4JMFio= github.com/ianschenck/envflag v0.0.0-20140720210342-9111d830d133 h1:h6FO/Da7rdYqJbRYMW9f+SMBWnJVguWh+0ERefW8zp8= github.com/ianschenck/envflag v0.0.0-20140720210342-9111d830d133/go.mod h1:pyYc5lldRtL0l5YitYVv1dLKuC0qhMfAfiR7BLsN2pA= -github.com/joho/godotenv v1.2.0 h1:vGTvz69FzUFp+X4/bAkb0j5BoLC+9bpqTWY8mjhA9pc= -github.com/joho/godotenv v1.2.0/go.mod h1:7hK45KPybAkOC6peb+G5yklZfMxEjkZhHbwpqxOKXbg= +github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= +github.com/joho/godotenv v1.3.0 h1:Zjp+RcGpHhGlrMbJzXTrZZPrWj+1vfm90La1wgB6Bhc= +github.com/joho/godotenv v1.3.0/go.mod h1:7hK45KPybAkOC6peb+G5yklZfMxEjkZhHbwpqxOKXbg= +github.com/json-iterator/go v1.1.7 h1:KfgG9LzI+pYjr4xvmz/5H4FXjokeP+rlHLhv3iH62Fo= +github.com/json-iterator/go v1.1.7/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= +github.com/json-iterator/go v1.1.9 h1:9yzud/Ht36ygwatGx56VwCZtlI/2AD15T1X2sjSuGns= +github.com/json-iterator/go v1.1.9/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/koding/cache v0.0.0-20161222233015-e8a81b0b3f20 h1:R7RAW1p8wjhlHKFhS4X7h8EePqADev/PltCmW9qlJoM= github.com/koding/cache v0.0.0-20161222233015-e8a81b0b3f20/go.mod h1:sh5SGGmQVGUkWDnxevz0I2FJ4TeC18hRPRjKVBMb2kA= +github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= +github.com/konsorten/go-windows-terminal-sequences v1.0.2 h1:DB17ag19krx9CFsz4o3enTrPXyIXCl+2iCXH/aMAp9s= +github.com/konsorten/go-windows-terminal-sequences v1.0.2/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/kr/pretty v0.1.0 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= -github.com/lib/pq v0.0.0-20171019223007-456514e2defe h1:3W7DA0pKM6dPkHc4thTL7VJw32yEIbeQNgpzIaSW9kI= -github.com/lib/pq v0.0.0-20171019223007-456514e2defe/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= -github.com/mailru/easyjson v0.0.0-20180823135443-60711f1a8329 h1:2gxZ0XQIU/5z3Z3bUBu+FXuk2pFbkN6tcwi/pjyaDic= -github.com/mailru/easyjson v0.0.0-20180823135443-60711f1a8329/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= +github.com/leodido/go-urn v1.1.0 h1:Sm1gr51B1kKyfD2BlRcLSiEkffoG96g6TPv6eRoEiB8= +github.com/leodido/go-urn v1.1.0/go.mod h1:+cyI34gQWZcE1eQU7NVgKkkzdXDQHr1dBMtdAPozLkw= +github.com/leodido/go-urn v1.2.0 h1:hpXL4XnriNwQ/ABnpepYM/1vCLWNDfUNts8dX3xTG6Y= +github.com/leodido/go-urn v1.2.0/go.mod h1:+8+nEpDfqqsY+g338gtMEUOtuK+4dEMhiQEgxpxOKII= +github.com/lib/pq v1.2.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= +github.com/lib/pq v1.3.0 h1:/qkRGz8zljWiDcFvgpwUpwIAPu3r07TDvs3Rws+o/pU= +github.com/lib/pq v1.3.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= +github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= +github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= github.com/mattn/go-isatty v0.0.3 h1:ns/ykhmWi7G9O+8a448SecJU3nSMBXJfqQkl0upE1jI= github.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= -github.com/mattn/go-jsonpointer v0.0.0-20170427002117-a39417dc2a77 h1:iABqXj7kXcDBtR7YDEiHlmcyj0tjUTOG8bVlQZaSJ/M= -github.com/mattn/go-jsonpointer v0.0.0-20170427002117-a39417dc2a77/go.mod h1:SDJ4hurDYyQ9/7nc+eCYtXqdufgK4Cq9TJlwPklqEYA= -github.com/mattn/go-sqlite3 v1.2.0 h1:h2FYSp18EBpSL2XOLiU2jIvYcJpx5NxGmT2EFlaUesw= -github.com/mattn/go-sqlite3 v1.2.0/go.mod h1:FPy6KqzDD04eiIsT53CuJW3U88zkxoIYsOqkbpncsNc= -github.com/mspiegel/go-multierror v0.0.0-20170309222903-065aa648c994 h1:US8eTr0SXNF/ci7I8acpBcFEJN4FOGre5g5zqkurgyg= -github.com/mspiegel/go-multierror v0.0.0-20170309222903-065aa648c994/go.mod h1:xw4ib7HNutwdEm5bOdXFQKaHjuhRMWtZgMIVIihyuWI= -github.com/pelletier/go-toml v1.0.1 h1:0nx4vKBl23+hEaCOV1mFhKS9vhhBtFYWC7rQY0vJAyE= -github.com/pelletier/go-toml v1.0.1/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= -github.com/philhofer/fwd v1.0.0 h1:UbZqGr5Y38ApvM/V/jEljVxwocdweyH+vmYvRPBnbqQ= -github.com/philhofer/fwd v1.0.0/go.mod h1:gk3iGcWd9+svBvR0sR+KPcfE+RNWozjowpeBVG3ZVNU= -github.com/pkg/errors v0.8.0 h1:WdK/asTD0HN+q6hsWO3/vpuAkAr+tw6aNJNDFFf0+qw= -github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/mattn/go-isatty v0.0.9/go.mod h1:YNRxwqDuOph6SZLI9vUUz6OYw3QyUt7WiY2yME+cCiQ= +github.com/mattn/go-isatty v0.0.12 h1:wuysRhFDzyxgEmMf5xjvJ2M9dZoWAXNNr5LSBS7uHXY= +github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= +github.com/mattn/go-jsonpointer v0.0.1 h1:j5m5P9BdP4B/zn6J7oH3KIQSOa2OHmcNAKEozUW7wuE= +github.com/mattn/go-jsonpointer v0.0.1/go.mod h1:1s8vx7JSjlgVRF+LW16MPpWSRZAxyrc1/FYzOonxeao= +github.com/mattn/go-runewidth v0.0.4/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= +github.com/mattn/go-sqlite3 v1.12.0/go.mod h1:FPy6KqzDD04eiIsT53CuJW3U88zkxoIYsOqkbpncsNc= +github.com/mattn/go-sqlite3 v2.0.3+incompatible h1:gXHsfypPkaMZrKbD5209QV9jbUTJKjyR5WD3HYQSd+U= +github.com/mattn/go-sqlite3 v2.0.3+incompatible/go.mod h1:FPy6KqzDD04eiIsT53CuJW3U88zkxoIYsOqkbpncsNc= +github.com/mitchellh/cli v1.0.0/go.mod h1:hNIlj7HEI86fIcpObd7a0FcrxTWetlwJDGcceTlRvqc= +github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= +github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= +github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421 h1:ZqeYNhU3OHLH3mGKHDcjJRFFRrJa6eAM5H+CtDdOsPc= +github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= +github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg= +github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= +github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742 h1:Esafd1046DLDQ0W1YjYsBW+p8U2u7vzgW2SQVmlNazg= +github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= +github.com/modern-go/reflect2 v1.0.1 h1:9f412s+6RmYXLWZSEzVVgPGK7C2PphHj5RJrvfx9AWI= +github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= +github.com/mspiegel/go-multierror v0.0.0-20171123200149-ea68e724609a h1:HnmAXioxa65x3xNfwZOQA0ATIRTWnYv/dmcYrbtpIdE= +github.com/mspiegel/go-multierror v0.0.0-20171123200149-ea68e724609a/go.mod h1:xw4ib7HNutwdEm5bOdXFQKaHjuhRMWtZgMIVIihyuWI= +github.com/olekukonko/tablewriter v0.0.1/go.mod h1:vsDQFd/mU46D+Z4whnwzcISnGGzXWMclvtLoiIKAKIo= +github.com/olekukonko/tablewriter v0.0.2/go.mod h1:rSAaSIOAGT9odnlyGlUfAJaoc5w2fSBUmeGDbRWPxyQ= +github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= +github.com/pelletier/go-toml v1.6.0 h1:aetoXYr0Tv7xRU/V4B4IZJ2QcbtMUFoNb3ORp7TzIK4= +github.com/pelletier/go-toml v1.6.0/go.mod h1:5N711Q9dKgbdkxHL+MEfF31hpT7l0S0s/t2kKREewys= +github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= +github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/pquerna/ffjson v0.0.0-20180717144149-af8b230fcd20 h1:7sBb9iOkeq+O7AXlVoH/8zpIcRXX523zMkKKspHjjx8= -github.com/pquerna/ffjson v0.0.0-20180717144149-af8b230fcd20/go.mod h1:YARuvh7BUWHNhzDq2OM5tzR2RiCcN2D7sapiKyCel/M= -github.com/rubenv/sql-migrate v0.0.0-20170824124545-79fe99e24311 h1:zM8ImA1q87ULfhJHCoL4oe143J3qdXF2XWjJX42gszQ= -github.com/rubenv/sql-migrate v0.0.0-20170824124545-79fe99e24311/go.mod h1:WS0rl9eEliYI8DPnr3TOwz4439pay+qNgzJoVya/DmY= -github.com/russross/meddler v0.0.0-20170319163028-9515f6b01c15 h1:5lwmRG81Tx9fo0v9ASSwDg3J+6s10RC/dWwROtJYTw4= -github.com/russross/meddler v0.0.0-20170319163028-9515f6b01c15/go.mod h1:L0qig4K5sCW6YvsjqjPgkKJpwphlhMX1SmjGdcKXbsw= -github.com/stretchr/objx v0.0.0-20150928122152-1a9d0bb9f541 h1:nvL7eaZN/Zw5emVOGaOclbLMeFO030UrPtWFTUS0p80= -github.com/stretchr/objx v0.0.0-20150928122152-1a9d0bb9f541/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/testify v1.1.4 h1:ToftOQTytwshuOSj6bDSolVUa3GINfJP/fg3OkkOzQQ= -github.com/stretchr/testify v1.1.4/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= -github.com/tinylib/msgp v1.0.2 h1:DfdQrzQa7Yh2es9SuLkixqxuXS2SxsdYn0KbdrOGWD8= -github.com/tinylib/msgp v1.0.2/go.mod h1:+d+yLhGm8mzTaHzB+wgMYrodPfmZrzkirds8fDWklFE= -github.com/ugorji/go v0.0.0-20171019201919-bdcc60b419d1 h1:UvhxfNjNqlZ/x3cDyqxMhoiUpemd3zXkVQApN6bM/lg= -github.com/ugorji/go v0.0.0-20171019201919-bdcc60b419d1/go.mod h1:hnLbHMwcvSihnDhEfx2/BzKp2xb0Y+ErdfYcrs9tkJQ= +github.com/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndrE9hABlRI= +github.com/rogpeppe/go-internal v1.1.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= +github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= +github.com/rogpeppe/go-internal v1.3.2/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTEfhy4qGm1nDQc= +github.com/rogpeppe/go-internal v1.4.0 h1:LUa41nrWTQNGhzdsZ5lTnkwbNjj6rXTdazA1cSdjkOY= +github.com/rogpeppe/go-internal v1.4.0/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTEfhy4qGm1nDQc= +github.com/rubenv/sql-migrate v0.0.0-20200212082348-64f95ea68aa3 h1:xkBtI5JktwbW/vf4vopBbhYsRFTGfQWHYXzC0/qYwxI= +github.com/rubenv/sql-migrate v0.0.0-20200212082348-64f95ea68aa3/go.mod h1:rtQlpHw+eR6UrqaS3kX1VYeaCxzCVdimDS7g5Ln4pPc= +github.com/russross/blackfriday v1.5.2/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g= +github.com/russross/meddler v0.0.0-20191023082315-51a972bb8fb2 h1:D9FKfhd06ImwXwf3YGdhs6Q2IrOA1mMfa/kwWZTUZkA= +github.com/russross/meddler v0.0.0-20191023082315-51a972bb8fb2/go.mod h1:L0qig4K5sCW6YvsjqjPgkKJpwphlhMX1SmjGdcKXbsw= +github.com/sirupsen/logrus v1.4.2 h1:SPIRibHv4MatM3XXNO2BJeFLZwZ2LvZgfQ5+UNI2im4= +github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= +github.com/spf13/afero v1.1.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B0CQ= +github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= +github.com/spf13/cobra v0.0.5/go.mod h1:3K3wKZymM7VvHMDS9+Akkh4K60UwM26emMESw8tLCHU= +github.com/spf13/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo= +github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= +github.com/spf13/viper v1.3.2/go.mod h1:ZiWeW+zYFKm7srdB9IoDzzZXaJaI5eL9QjNiN/DMA2s= +github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/objx v0.1.1 h1:2vfRuCMp5sSVIDSqO8oNnWJq7mPa6KVP3iPIwFBuy8A= +github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= +github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= +github.com/stretchr/testify v1.4.0 h1:2E4SXV/wtOkTonXsotYi4li6zVWxYlZuYNCXe9XRJyk= +github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= +github.com/ugorji/go v1.1.7 h1:/68gy2h+1mWMrwZFeD1kQialdSzAb432dtpeJ42ovdo= +github.com/ugorji/go v1.1.7/go.mod h1:kZn38zHttfInRq0xu/PH0az30d+z6vm202qpg1oXVMw= +github.com/ugorji/go/codec v0.0.0-20181204163529-d75b2dcb6bc8/go.mod h1:VFNgLljTbGfSG7qAOspJ7OScBnGdDN/yBr0sguwnwf0= +github.com/ugorji/go/codec v1.1.7 h1:2SvQaVZ1ouYrrKKwoSk2pzd4A9evlKJb9oTL+OaLUSs= +github.com/ugorji/go/codec v1.1.7/go.mod h1:Ax+UKWsSmolVDwsd+7N3ZtXu+yMGCf907BLYF3GoBXY= +github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77/go.mod h1:aYKd//L2LvnjZzWKhF00oedf4jCCReLcmhLdhm1A27Q= github.com/ziutek/mymysql v1.5.4 h1:GB0qdRGsTwQSBVYuVShFBKaXSnSnYYC2d9knnE1LHFs= github.com/ziutek/mymysql v1.5.4/go.mod h1:LMSpPZ6DbqWFxNCHW77HeMg9I646SAhApZ/wKdgO/C0= -golang.org/x/net v0.0.0-20171019164906-aabf50738bcd h1:c+vKpE75HPaGdQfc3Je2ciQzBKeYDS4k6GyBQO7tjeI= -golang.org/x/net v0.0.0-20171019164906-aabf50738bcd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/oauth2 v0.0.0-20170928010508-bb50c06baba3 h1:YGx0PRKSN/2n/OcdFycCC0JUA/Ln+i5lPcN8VoNDus0= -golang.org/x/oauth2 v0.0.0-20170928010508-bb50c06baba3/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= -golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f h1:wMNYb4v58l5UBM7MYRLPG6ZhfOqbKu7X5eyFl8ZhKvA= -golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sys v0.0.0-20171017063910-8dbc5d05d6ed h1:7TjTAJENziDn0SiwaaVypM+TFSq4rk6LJOuy3GUKMhg= -golang.org/x/sys v0.0.0-20171017063910-8dbc5d05d6ed/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -google.golang.org/appengine v1.0.0 h1:dN4LljjBKVChsv0XCSI+zbyzdqrkEwX5LQFUMRSGqOc= -google.golang.org/appengine v1.0.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= +golang.org/x/crypto v0.0.0-20181203042331-505ab145d0a9/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= +golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= +golang.org/x/crypto v0.0.0-20190325154230-a5d413f7728c/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= +golang.org/x/crypto v0.0.0-20190621222207-cc06ce4a13d4 h1:ydJNl0ENAG67pFbB+9tfhiL2pYqLhfoaZFw/cjLhY4A= +golang.org/x/crypto v0.0.0-20190621222207-cc06ce4a13d4/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20200317142112-1b76d66859c6 h1:TjszyFsQsyZNHwdVdZ5m7bjmreu0znc2kRYsEml9/Ww= +golang.org/x/crypto v0.0.0-20200317142112-1b76d66859c6/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= +golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200301022130-244492dfa37a h1:GuSPYbZzB5/dcLNCwLQLsg3obCJtX9IJhpXkvY7kzk0= +golang.org/x/net v0.0.0-20200301022130-244492dfa37a/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= +golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d h1:TzXSXBo42m9gQenoE3b9BGiEpg5IG2JkU5FkPIawgtw= +golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e h1:vcxGaoTs7kV8m5Np9uUNQin4BrLOthgV7252N8V+FwY= +golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/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-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190515120540-06a5c4944438/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190813064441-fde4db37ae7a/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200317113312-5766fd39f98d h1:62ap6LNOjDU6uGmKXHJbSfciMoV+FeI1sRXx/pLDL44= +golang.org/x/sys v0.0.0-20200317113312-5766fd39f98d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= +golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20191004055002-72853e10c5a3/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= +google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= +google.golang.org/appengine v1.6.5 h1:tycE03LOZYQNhDpS27tcQdAzLCVMaj7QT2SXxebnpCM= +google.golang.org/appengine v1.6.5/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 h1:qIbj1fsPNlZgppZ+VLlY7N33q108Sa+fhmuc+sWQYwY= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= gopkg.in/go-playground/assert.v1 v1.2.1 h1:xoYuJVE7KT85PYWrN730RguIQO0ePzVRfFMXadIrXTM= gopkg.in/go-playground/assert.v1 v1.2.1/go.mod h1:9RXL0bg/zibRAgZUYszZSwO/z8Y/a8bDuhia5mkpMnE= -gopkg.in/go-playground/validator.v8 v8.18.2 h1:lFB4DoMU6B626w8ny76MV7VX6W2VHct2GVOI3xgiMrQ= -gopkg.in/go-playground/validator.v8 v8.18.2/go.mod h1:RX2a/7Ha8BgOhfk7j780h4/u/RRjR0eouCJSH80/M2Y= -gopkg.in/gorp.v1 v1.7.1 h1:GBB9KrWRATQZh95HJyVGUZrWwOPswitEYEyqlK8JbAA= -gopkg.in/gorp.v1 v1.7.1/go.mod h1:Wo3h+DBQZIxATwftsglhdD/62zRFPhGhTiu5jUJmCaw= -gopkg.in/mgo.v2 v2.0.0-20160818020120-3f83fa500528 h1:/saqWwm73dLmuzbNhe92F0QsZ/KiFND+esHco2v1hiY= -gopkg.in/mgo.v2 v2.0.0-20160818020120-3f83fa500528/go.mod h1:yeKp02qBN3iKW1OzL3MGk2IdtZzaj7SFntXj72NppTA= -gopkg.in/yaml.v2 v2.0.0-20170812160011-eb3733d160e7 h1:+t9dhfO+GNOIGJof6kPOAenx7YgrZMTdRPV+EsnPabk= -gopkg.in/yaml.v2 v2.0.0-20170812160011-eb3733d160e7/go.mod h1:JAlM8MvJe8wmxCU4Bli9HhUf9+ttbYbLASfIpnQbh74= +gopkg.in/go-playground/validator.v9 v9.29.1 h1:SvGtYmN60a5CVKTOzMSyfzWDeZRxRuGvRQyEAKbw1xc= +gopkg.in/go-playground/validator.v9 v9.29.1/go.mod h1:+c9/zcJMFNgbLvly1L1V+PpxWdVbfP1avr/N00E2vyQ= +gopkg.in/go-playground/validator.v9 v9.31.0 h1:bmXmP2RSNtFES+bn4uYuHT7iJFJv7Vj+an+ZQdDaD1M= +gopkg.in/go-playground/validator.v9 v9.31.0/go.mod h1:+c9/zcJMFNgbLvly1L1V+PpxWdVbfP1avr/N00E2vyQ= +gopkg.in/gorp.v1 v1.7.2 h1:j3DWlAyGVv8whO7AcIWznQ2Yj7yJkn34B8s63GViAAw= +gopkg.in/gorp.v1 v1.7.2/go.mod h1:Wo3h+DBQZIxATwftsglhdD/62zRFPhGhTiu5jUJmCaw= +gopkg.in/mgo.v2 v2.0.0-20190816093944-a6b53ec6cb22 h1:VpOs+IwYnYBaFnrNAeB8UUWtL3vEUnzSCL1nVjPhqrw= +gopkg.in/mgo.v2 v2.0.0-20190816093944-a6b53ec6cb22/go.mod h1:yeKp02qBN3iKW1OzL3MGk2IdtZzaj7SFntXj72NppTA= +gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.5/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.8 h1:obN1ZagJSUGI0Ek/LBmuj4SNLPfIny3KsKFopxRdj10= +gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= diff --git a/logstats/logstats.go b/logstats/logstats.go index 9561683..03100db 100644 --- a/logstats/logstats.go +++ b/logstats/logstats.go @@ -27,7 +27,7 @@ import ( "github.com/capitalone/checks-out/set" "github.com/capitalone/checks-out/store/datastore" - log "github.com/Sirupsen/logrus" + log "github.com/sirupsen/logrus" ) var ( diff --git a/main.go b/main.go index 8189231..494ee0f 100644 --- a/main.go +++ b/main.go @@ -35,8 +35,8 @@ import ( "github.com/capitalone/checks-out/usage" "github.com/capitalone/checks-out/version" - "github.com/Sirupsen/logrus" _ "github.com/joho/godotenv/autoload" + "github.com/sirupsen/logrus" ) func setLogLevel(level string) { diff --git a/migration/migration.go b/migration/migration.go index c22d53a..340fbac 100644 --- a/migration/migration.go +++ b/migration/migration.go @@ -25,8 +25,8 @@ import ( "github.com/capitalone/checks-out/remote" "github.com/capitalone/checks-out/store" - log "github.com/Sirupsen/logrus" "github.com/mspiegel/go-multierror" + log "github.com/sirupsen/logrus" ) // Migrate performs any (store x remote) operations necessary diff --git a/model/org.go b/model/org.go index fd237e7..8c0893d 100644 --- a/model/org.go +++ b/model/org.go @@ -19,8 +19,8 @@ See the License for the specific language governing permissions and limitations package model type GitHubOrg struct { - Login string `json:"login"` - Avatar string `json:"avatar"` - Enabled bool `json:"enabled"` - Admin bool `json:"admin"` + Login string `json:"login"` + Avatar string `json:"avatar"` + Enabled bool `json:"enabled"` + Admin bool `json:"admin"` } diff --git a/model/repo.go b/model/repo.go index ce1cc77..190e786 100644 --- a/model/repo.go +++ b/model/repo.go @@ -36,7 +36,6 @@ type Perm struct { Admin bool } - type OrgDb struct { ID int64 `json:"id,omitempty" meddler:"org_id,pk"` UserID int64 `json:"-" meddler:"org_user_id"` diff --git a/model/scopepolicy.go b/model/scopepolicy.go index 4ce4fa7..1079023 100644 --- a/model/scopepolicy.go +++ b/model/scopepolicy.go @@ -22,7 +22,7 @@ import ( "github.com/capitalone/checks-out/strings/miniglob" "github.com/capitalone/checks-out/strings/rxserde" - log "github.com/Sirupsen/logrus" + log "github.com/sirupsen/logrus" ) func fileMatch(globs []miniglob.MiniGlob, filename string) bool { diff --git a/model/tag.go b/model/tag.go index 6c2f6f0..ab55f4e 100644 --- a/model/tag.go +++ b/model/tag.go @@ -117,7 +117,7 @@ func (t *TagConfig) build() error { } func (t *TagConfig) validate() error { - buffer, err := t.execute(TemplateTag{Version:"1.0.0"}) + buffer, err := t.execute(TemplateTag{Version: "1.0.0"}) if err != nil { return err } diff --git a/notifier/github/github.go b/notifier/github/github.go index de0f2ad..80d3779 100644 --- a/notifier/github/github.go +++ b/notifier/github/github.go @@ -22,11 +22,11 @@ import ( "context" "fmt" - log "github.com/Sirupsen/logrus" "github.com/capitalone/checks-out/model" "github.com/capitalone/checks-out/notifier" "github.com/capitalone/checks-out/remote" "github.com/capitalone/checks-out/web" + log "github.com/sirupsen/logrus" ) type MySender struct{} diff --git a/notifier/notifier.go b/notifier/notifier.go index ebcf5bb..0d03aac 100644 --- a/notifier/notifier.go +++ b/notifier/notifier.go @@ -23,8 +23,8 @@ import ( "fmt" "strings" - log "github.com/Sirupsen/logrus" "github.com/capitalone/checks-out/model" + log "github.com/sirupsen/logrus" ) var ( diff --git a/notifier/slack/slack.go b/notifier/slack/slack.go index 4a61275..d8ee2aa 100644 --- a/notifier/slack/slack.go +++ b/notifier/slack/slack.go @@ -30,7 +30,7 @@ import ( "github.com/capitalone/checks-out/model" "github.com/capitalone/checks-out/notifier" - log "github.com/Sirupsen/logrus" + log "github.com/sirupsen/logrus" ) var ( diff --git a/remote/github/github.go b/remote/github/github.go index 2d2a1fd..8fee3fb 100644 --- a/remote/github/github.go +++ b/remote/github/github.go @@ -34,9 +34,9 @@ import ( "github.com/capitalone/checks-out/shared/httputil" "github.com/capitalone/checks-out/strings/lowercase" - log "github.com/Sirupsen/logrus" - "github.com/google/go-github/github" + "github.com/google/go-github/v30/github" multierror "github.com/mspiegel/go-multierror" + log "github.com/sirupsen/logrus" "golang.org/x/oauth2" ) @@ -258,7 +258,7 @@ func (g *Github) ListTeams(ctx context.Context, user *model.User, org string) (s func getTeams(ctx context.Context, client *github.Client, org string) ([]*github.Team, error) { var teams []*github.Team resp, err := buildCompleteList(func(opts *github.ListOptions) (*github.Response, error) { - newTeams, response, err := client.Organizations.ListTeams(ctx, org, opts) + newTeams, response, err := client.Teams.ListTeams(ctx, org, opts) teams = append(teams, newTeams...) return response, err }) @@ -279,22 +279,22 @@ func getTeamMembers(ctx context.Context, client *github.Client, org string, team if err != nil { return nil, err } - var id *int64 + var slug *string for _, t := range teams { if strings.EqualFold(t.GetSlug(), team) { - id = t.ID + slug = t.Slug break } } - if id == nil { + if slug == nil { err = fmt.Errorf("Team %s not found for organization %s.", team, org) return nil, exterror.Create(http.StatusNotFound, err) } - topts := github.OrganizationListTeamMembersOptions{} + topts := github.TeamListTeamMembersOptions{} var teammates []*github.User resp, err := buildCompleteList(func(opts *github.ListOptions) (*github.Response, error) { topts.ListOptions = *opts - newTmates, resp2, err2 := client.Organizations.ListTeamMembers(ctx, *id, &topts) + newTmates, resp2, err2 := client.Teams.ListTeamMembersBySlug(ctx, org, *slug, &topts) teammates = append(teammates, newTmates...) return resp2, err2 }) @@ -715,7 +715,7 @@ func (g *Github) GetAllComments(ctx context.Context, u *model.User, r *model.Rep } func getAllComments(ctx context.Context, client *github.Client, r *model.Repo, num int) ([]*model.Comment, error) { - lcOpts := github.IssueListCommentsOptions{Direction: "desc", Sort: "created"} + lcOpts := github.IssueListCommentsOptions{Direction: github.String("desc"), Sort: github.String("created")} var comm []*github.IssueComment resp, err := buildCompleteList(func(opts *github.ListOptions) (*github.Response, error) { lcOpts.ListOptions = *opts @@ -773,15 +773,19 @@ func getHead(ctx context.Context, client *github.Client, r *model.Repo, num int, return commit, nil } +func timep(t time.Time) *time.Time { + return &t +} + func getCommentsSinceHead(ctx context.Context, client *github.Client, r *model.Repo, num int, noUIMerge bool) ([]*model.Comment, error) { commit, err := getHead(ctx, client, r, num, noUIMerge) if err != nil { return nil, err } lcOpts := github.IssueListCommentsOptions{ - Direction: "desc", - Sort: "created", - Since: commit.Commit.Committer.GetDate()} + Direction: github.String("desc"), + Sort: github.String("created"), + Since: timep(commit.Commit.Committer.GetDate())} var comm []*github.IssueComment resp, err := buildCompleteList(func(opts *github.ListOptions) (*github.Response, error) { lcOpts.ListOptions = *opts @@ -1010,7 +1014,7 @@ func createEmptyCommit(ctx context.Context, client *github.Client, r *model.Repo commit, resp, err := client.Git.CreateCommit(ctx, r.Owner, r.Name, &github.Commit{ Message: github.String(msg), Tree: prev.Tree, - Parents: []github.Commit{{ + Parents: []*github.Commit{{ SHA: github.String(sha), }}, }) diff --git a/remote/github/github_integration_test.go b/remote/github/github_integration_test.go index a71169c..17101c0 100644 --- a/remote/github/github_integration_test.go +++ b/remote/github/github_integration_test.go @@ -30,7 +30,7 @@ import ( "github.com/capitalone/checks-out/exterror" "github.com/capitalone/checks-out/model" - "github.com/google/go-github/github" + "github.com/google/go-github/v30/github" "golang.org/x/oauth2" ) @@ -140,7 +140,7 @@ func testGetRepo(t *testing.T, client *github.Client, repo *github.Repository) { func testGetComments(t *testing.T, client *github.Client, repo *github.Repository, pr *github.PullRequest) { ctx := context.Background() - opts := github.IssueListCommentsOptions{Direction: "desc", Sort: "created"} + opts := github.IssueListCommentsOptions{Direction: github.String("desc"), Sort: github.String("created")} opts.PerPage = 100 comm, _, err := client.Issues.ListComments(ctx, *repo.Owner.Login, *repo.Name, *pr.Number, &opts) if err != nil { @@ -360,7 +360,7 @@ func createTestCommit(t *testing.T, client *github.Client, repo *github.Reposito if err != nil { t.Fatal("Unable to get create blob", filename, err) } - tree, _, err := client.Git.CreateTree(ctx, *repo.Owner.Login, *repo.Name, *branch.Object.SHA, []github.TreeEntry{{ + tree, _, err := client.Git.CreateTree(ctx, *repo.Owner.Login, *repo.Name, *branch.Object.SHA, []*github.TreeEntry{{ Path: github.String(filename), Mode: github.String("100644"), Type: github.String("blob"), @@ -372,7 +372,7 @@ func createTestCommit(t *testing.T, client *github.Client, repo *github.Reposito commit, _, err := client.Git.CreateCommit(ctx, *repo.Owner.Login, *repo.Name, &github.Commit{ Message: github.String(fmt.Sprintf("%s commit", filename)), Tree: tree, - Parents: []github.Commit{{ + Parents: []*github.Commit{{ SHA: branch.Object.SHA, }, }, diff --git a/remote/github/paging.go b/remote/github/paging.go index fdee22e..58fb610 100644 --- a/remote/github/paging.go +++ b/remote/github/paging.go @@ -19,7 +19,7 @@ See the License for the specific language governing permissions and limitations package github import ( - "github.com/google/go-github/github" + "github.com/google/go-github/v30/github" ) func buildCompleteList(process func(opts *github.ListOptions) (*github.Response, error)) (*github.Response, error) { diff --git a/remote/github/utils.go b/remote/github/utils.go index d4b2787..22c72a2 100644 --- a/remote/github/utils.go +++ b/remote/github/utils.go @@ -29,7 +29,7 @@ import ( "github.com/capitalone/checks-out/model" "github.com/capitalone/checks-out/usage" - "github.com/google/go-github/github" + "github.com/google/go-github/v30/github" "golang.org/x/oauth2" ) @@ -180,7 +180,6 @@ func getOrgHook(ctx context.Context, client *github.Client, owner, rawurl string // for the specified repository. func createHook(ctx context.Context, client *github.Client, owner, name, url string) (*github.Hook, error) { var hook = new(github.Hook) - hook.Name = github.String("web") hook.Events = []string{"issue_comment", "status", "pull_request", "pull_request_review"} hook.Config = map[string]interface{}{} hook.Config["url"] = url @@ -196,7 +195,6 @@ func createHook(ctx context.Context, client *github.Client, owner, name, url str // for the specified Organization. func createOrgHook(ctx context.Context, client *github.Client, owner, url string) (*github.Hook, error) { var hook = new(github.Hook) - hook.Name = github.String("web") hook.Events = []string{"repository"} hook.Config = map[string]interface{}{} hook.Config["url"] = url diff --git a/remote/github/walk.go b/remote/github/walk.go index f7e5c29..a07c643 100644 --- a/remote/github/walk.go +++ b/remote/github/walk.go @@ -25,7 +25,7 @@ import ( "github.com/capitalone/checks-out/model" "github.com/capitalone/checks-out/set" - "github.com/google/go-github/github" + "github.com/google/go-github/v30/github" ) var systemAccounts = set.New("GitHub", "GitHub Enterprise") @@ -71,8 +71,8 @@ func followCommit(ctx context.Context, client *github.Client, r *model.Repo, com if !isCommitUIMerge(commit) { return commit, nil } - left := &commit.Parents[0] - right := &commit.Parents[1] + left := commit.Parents[0] + right := commit.Parents[1] if baseref.Contains(*left.SHA) && baseref.Contains(*right.SHA) { return commit, nil } diff --git a/router/middleware/access/access.go b/router/middleware/access/access.go index 9fd82d3..bc9bdd4 100644 --- a/router/middleware/access/access.go +++ b/router/middleware/access/access.go @@ -22,8 +22,8 @@ import ( "github.com/capitalone/checks-out/remote" "github.com/capitalone/checks-out/router/middleware/session" - log "github.com/Sirupsen/logrus" "github.com/gin-gonic/gin" + log "github.com/sirupsen/logrus" ) func OwnerAdmin(c *gin.Context) { diff --git a/router/middleware/cache.go b/router/middleware/cache.go index c251632..45b839f 100644 --- a/router/middleware/cache.go +++ b/router/middleware/cache.go @@ -21,15 +21,15 @@ package middleware import ( "time" - "github.com/gin-gonic/gin" "github.com/capitalone/checks-out/cache" "github.com/capitalone/checks-out/envvars" + "github.com/gin-gonic/gin" ) func Cache() gin.HandlerFunc { cache_ := cache.NewTTL(time.Duration(envvars.Env.Cache.CacheTTL)) return func(c *gin.Context) { - cache.ToContext(c, cache_) + cache.ToContext(c, cache_) c.Next() } } diff --git a/router/middleware/exterror.go b/router/middleware/exterror.go index 087f5b4..d0d4763 100644 --- a/router/middleware/exterror.go +++ b/router/middleware/exterror.go @@ -23,8 +23,8 @@ import ( "github.com/capitalone/checks-out/exterror" - log "github.com/Sirupsen/logrus" "github.com/gin-gonic/gin" + log "github.com/sirupsen/logrus" ) func ExtError() gin.HandlerFunc { diff --git a/router/middleware/logrequests.go b/router/middleware/logrequests.go index 06fb668..300d08a 100644 --- a/router/middleware/logrequests.go +++ b/router/middleware/logrequests.go @@ -25,8 +25,8 @@ import ( "github.com/capitalone/checks-out/envvars" "github.com/capitalone/checks-out/exterror" - "github.com/Sirupsen/logrus" "github.com/gin-gonic/gin" + "github.com/sirupsen/logrus" ) func Ginrus(logger *logrus.Logger, timeFormat string, utc bool) gin.HandlerFunc { diff --git a/router/middleware/recovery.go b/router/middleware/recovery.go index 0451d56..a6bed55 100644 --- a/router/middleware/recovery.go +++ b/router/middleware/recovery.go @@ -27,8 +27,8 @@ import ( "net/http/httputil" "runtime" - "github.com/Sirupsen/logrus" "github.com/gin-gonic/gin" + "github.com/sirupsen/logrus" ) var ( diff --git a/router/middleware/session/capabilities.go b/router/middleware/session/capabilities.go index 28835a7..d6847e9 100644 --- a/router/middleware/session/capabilities.go +++ b/router/middleware/session/capabilities.go @@ -19,10 +19,10 @@ See the License for the specific language governing permissions and limitations package session import ( - "github.com/gin-gonic/gin" "github.com/capitalone/checks-out/exterror" "github.com/capitalone/checks-out/model" "github.com/capitalone/checks-out/remote" + "github.com/gin-gonic/gin" ) func Capability(c *gin.Context) *model.Capabilities { diff --git a/router/middleware/store.go b/router/middleware/store.go index 4176339..16748b9 100644 --- a/router/middleware/store.go +++ b/router/middleware/store.go @@ -21,9 +21,9 @@ package middleware import ( "fmt" - "github.com/gin-gonic/gin" "github.com/capitalone/checks-out/store" "github.com/capitalone/checks-out/store/datastore" + "github.com/gin-gonic/gin" ) func Store() gin.HandlerFunc { diff --git a/router/router.go b/router/router.go index 9401d08..244ad52 100644 --- a/router/router.go +++ b/router/router.go @@ -24,7 +24,6 @@ import ( rpprof "runtime/pprof" "time" - "github.com/Sirupsen/logrus" "github.com/capitalone/checks-out/api" "github.com/capitalone/checks-out/envvars" "github.com/capitalone/checks-out/router/middleware" @@ -35,6 +34,7 @@ import ( "github.com/capitalone/checks-out/web/static" "github.com/capitalone/checks-out/web/template" "github.com/gin-gonic/gin" + "github.com/sirupsen/logrus" ) // Load creates a new HTTP handler diff --git a/set/lowerset.go b/set/lowerset.go index 5895967..1398210 100644 --- a/set/lowerset.go +++ b/set/lowerset.go @@ -20,8 +20,8 @@ package set import ( "encoding/json" - "sort" "github.com/capitalone/checks-out/strings/lowercase" + "sort" "strings" ) @@ -106,7 +106,7 @@ func (s LowerSet) Difference(other LowerSet) LowerSet { } func (s LowerSet) Print(sep string) string { - keys := s.KeysSorted(func(s1,s2 lowercase.String) bool { + keys := s.KeysSorted(func(s1, s2 lowercase.String) bool { return s1.String() < s2.String() }) return strings.Join(keys.ToStringSlice(), sep) @@ -142,7 +142,7 @@ func (s LowerSet) Keys() lowercase.Slice { return lst } -func (s LowerSet) KeysSorted(f func (s1, s2 lowercase.String) bool) lowercase.Slice { +func (s LowerSet) KeysSorted(f func(s1, s2 lowercase.String) bool) lowercase.Slice { lst := s.Keys() sort.Slice(lst, func(i, j int) bool { return f(lst[i], lst[j]) @@ -173,4 +173,4 @@ func (s *LowerSet) UnmarshalJSON(data []byte) error { func (s LowerSet) ToSet() Set { return New(s.Keys().ToStringSlice()...) -} \ No newline at end of file +} diff --git a/set/lowerset_test.go b/set/lowerset_test.go index 448ff6e..6738a2f 100644 --- a/set/lowerset_test.go +++ b/set/lowerset_test.go @@ -20,9 +20,9 @@ package set import ( "encoding/json" + "github.com/capitalone/checks-out/strings/lowercase" "reflect" "testing" - "github.com/capitalone/checks-out/strings/lowercase" ) func TestAddAllLower(t *testing.T) { diff --git a/set/set.go b/set/set.go index 17ac915..649b6a5 100644 --- a/set/set.go +++ b/set/set.go @@ -82,7 +82,7 @@ func (s Set) Difference(other Set) Set { func (s Set) Print(sep string) string { res := "" - keys := s.KeysSorted(func(s1,s2 string) bool { + keys := s.KeysSorted(func(s1, s2 string) bool { return s1 < s2 }) for i, k := range keys { @@ -115,7 +115,7 @@ func (s Set) Keys() []string { return lst } -func (s Set) KeysSorted(f func (s1, s2 string) bool) []string { +func (s Set) KeysSorted(f func(s1, s2 string) bool) []string { lst := s.Keys() sort.Slice(lst, func(i, j int) bool { return f(lst[i], lst[j]) diff --git a/store/context.go b/store/context.go index bd31721..ac432f8 100644 --- a/store/context.go +++ b/store/context.go @@ -38,4 +38,4 @@ func ToContext(c Setter, store Store) { } func AddToContext(c context.Context, store Store) context.Context { return context.WithValue(c, key, store) -} \ No newline at end of file +} diff --git a/store/datastore/datastore.go b/store/datastore/datastore.go index 6ab7649..eb4e74b 100644 --- a/store/datastore/datastore.go +++ b/store/datastore/datastore.go @@ -28,7 +28,7 @@ import ( "github.com/capitalone/checks-out/store" "github.com/capitalone/checks-out/store/migration" - "github.com/Sirupsen/logrus" + "github.com/sirupsen/logrus" // bindings for meddler _ "github.com/go-sql-driver/mysql" // bindings for meddler diff --git a/store/datastore/datastore_test.go b/store/datastore/datastore_test.go index 80bf73e..c912b44 100644 --- a/store/datastore/datastore_test.go +++ b/store/datastore/datastore_test.go @@ -20,8 +20,8 @@ package datastore import ( "database/sql" - "os" "github.com/capitalone/checks-out/set" + "os" ) // OpenTest opens a new database connection for testing purposes. diff --git a/store/datastore/users_test.go b/store/datastore/users_test.go index 8f41419..23ae1cf 100644 --- a/store/datastore/users_test.go +++ b/store/datastore/users_test.go @@ -19,8 +19,8 @@ See the License for the specific language governing permissions and limitations package datastore import ( - "github.com/franela/goblin" "github.com/capitalone/checks-out/model" + "github.com/franela/goblin" "testing" ) diff --git a/store/migration/migration_gen.go b/store/migration/migration_gen.go index 70a98c9..dc946de 100644 --- a/store/migration/migration_gen.go +++ b/store/migration/migration_gen.go @@ -560,25 +560,25 @@ func AssetNames() []string { // _bindata is a table, holding each asset generator, mapped to its name. var _bindata = map[string]func() (*asset, error){ - "sqlite3/001_init.sql": sqlite3001_initSql, - "sqlite3/002_org.sql": sqlite3002_orgSql, - "sqlite3/003_drop_emails.sql": sqlite3003_drop_emailsSql, - "sqlite3/004_limit_users.sql": sqlite3004_limit_usersSql, - "sqlite3/005_oauth_scope.sql": sqlite3005_oauth_scopeSql, - "sqlite3/006_add_orgs_table.sql": sqlite3006_add_orgs_tableSql, - "sqlite3/007_add_slack_urls.sql": sqlite3007_add_slack_urlsSql, - "mysql/001_init.sql": mysql001_initSql, - "mysql/002_org.sql": mysql002_orgSql, - "mysql/003_drop_emails.sql": mysql003_drop_emailsSql, - "mysql/004_limit_users.sql": mysql004_limit_usersSql, - "mysql/005_oauth_scope.sql": mysql005_oauth_scopeSql, - "mysql/006_add_orgs_table.sql": mysql006_add_orgs_tableSql, - "mysql/007_add_slack_urls.sql": mysql007_add_slack_urlsSql, - "postgres/001_init.sql": postgres001_initSql, - "postgres/002_org.sql": postgres002_orgSql, - "postgres/003_drop_emails.sql": postgres003_drop_emailsSql, - "postgres/004_limit_users.sql": postgres004_limit_usersSql, - "postgres/005_oauth_scope.sql": postgres005_oauth_scopeSql, + "sqlite3/001_init.sql": sqlite3001_initSql, + "sqlite3/002_org.sql": sqlite3002_orgSql, + "sqlite3/003_drop_emails.sql": sqlite3003_drop_emailsSql, + "sqlite3/004_limit_users.sql": sqlite3004_limit_usersSql, + "sqlite3/005_oauth_scope.sql": sqlite3005_oauth_scopeSql, + "sqlite3/006_add_orgs_table.sql": sqlite3006_add_orgs_tableSql, + "sqlite3/007_add_slack_urls.sql": sqlite3007_add_slack_urlsSql, + "mysql/001_init.sql": mysql001_initSql, + "mysql/002_org.sql": mysql002_orgSql, + "mysql/003_drop_emails.sql": mysql003_drop_emailsSql, + "mysql/004_limit_users.sql": mysql004_limit_usersSql, + "mysql/005_oauth_scope.sql": mysql005_oauth_scopeSql, + "mysql/006_add_orgs_table.sql": mysql006_add_orgs_tableSql, + "mysql/007_add_slack_urls.sql": mysql007_add_slack_urlsSql, + "postgres/001_init.sql": postgres001_initSql, + "postgres/002_org.sql": postgres002_orgSql, + "postgres/003_drop_emails.sql": postgres003_drop_emailsSql, + "postgres/004_limit_users.sql": postgres004_limit_usersSql, + "postgres/005_oauth_scope.sql": postgres005_oauth_scopeSql, "postgres/006_add_orgs_table.sql": postgres006_add_orgs_tableSql, "postgres/007_add_slack_urls.sql": postgres007_add_slack_urlsSql, } @@ -622,31 +622,32 @@ type bintree struct { Func func() (*asset, error) Children map[string]*bintree } + var _bintree = &bintree{nil, map[string]*bintree{ "mysql": &bintree{nil, map[string]*bintree{ - "001_init.sql": &bintree{mysql001_initSql, map[string]*bintree{}}, - "002_org.sql": &bintree{mysql002_orgSql, map[string]*bintree{}}, - "003_drop_emails.sql": &bintree{mysql003_drop_emailsSql, map[string]*bintree{}}, - "004_limit_users.sql": &bintree{mysql004_limit_usersSql, map[string]*bintree{}}, - "005_oauth_scope.sql": &bintree{mysql005_oauth_scopeSql, map[string]*bintree{}}, + "001_init.sql": &bintree{mysql001_initSql, map[string]*bintree{}}, + "002_org.sql": &bintree{mysql002_orgSql, map[string]*bintree{}}, + "003_drop_emails.sql": &bintree{mysql003_drop_emailsSql, map[string]*bintree{}}, + "004_limit_users.sql": &bintree{mysql004_limit_usersSql, map[string]*bintree{}}, + "005_oauth_scope.sql": &bintree{mysql005_oauth_scopeSql, map[string]*bintree{}}, "006_add_orgs_table.sql": &bintree{mysql006_add_orgs_tableSql, map[string]*bintree{}}, "007_add_slack_urls.sql": &bintree{mysql007_add_slack_urlsSql, map[string]*bintree{}}, }}, "postgres": &bintree{nil, map[string]*bintree{ - "001_init.sql": &bintree{postgres001_initSql, map[string]*bintree{}}, - "002_org.sql": &bintree{postgres002_orgSql, map[string]*bintree{}}, - "003_drop_emails.sql": &bintree{postgres003_drop_emailsSql, map[string]*bintree{}}, - "004_limit_users.sql": &bintree{postgres004_limit_usersSql, map[string]*bintree{}}, - "005_oauth_scope.sql": &bintree{postgres005_oauth_scopeSql, map[string]*bintree{}}, + "001_init.sql": &bintree{postgres001_initSql, map[string]*bintree{}}, + "002_org.sql": &bintree{postgres002_orgSql, map[string]*bintree{}}, + "003_drop_emails.sql": &bintree{postgres003_drop_emailsSql, map[string]*bintree{}}, + "004_limit_users.sql": &bintree{postgres004_limit_usersSql, map[string]*bintree{}}, + "005_oauth_scope.sql": &bintree{postgres005_oauth_scopeSql, map[string]*bintree{}}, "006_add_orgs_table.sql": &bintree{postgres006_add_orgs_tableSql, map[string]*bintree{}}, "007_add_slack_urls.sql": &bintree{postgres007_add_slack_urlsSql, map[string]*bintree{}}, }}, "sqlite3": &bintree{nil, map[string]*bintree{ - "001_init.sql": &bintree{sqlite3001_initSql, map[string]*bintree{}}, - "002_org.sql": &bintree{sqlite3002_orgSql, map[string]*bintree{}}, - "003_drop_emails.sql": &bintree{sqlite3003_drop_emailsSql, map[string]*bintree{}}, - "004_limit_users.sql": &bintree{sqlite3004_limit_usersSql, map[string]*bintree{}}, - "005_oauth_scope.sql": &bintree{sqlite3005_oauth_scopeSql, map[string]*bintree{}}, + "001_init.sql": &bintree{sqlite3001_initSql, map[string]*bintree{}}, + "002_org.sql": &bintree{sqlite3002_orgSql, map[string]*bintree{}}, + "003_drop_emails.sql": &bintree{sqlite3003_drop_emailsSql, map[string]*bintree{}}, + "004_limit_users.sql": &bintree{sqlite3004_limit_usersSql, map[string]*bintree{}}, + "005_oauth_scope.sql": &bintree{sqlite3005_oauth_scopeSql, map[string]*bintree{}}, "006_add_orgs_table.sql": &bintree{sqlite3006_add_orgs_tableSql, map[string]*bintree{}}, "007_add_slack_urls.sql": &bintree{sqlite3007_add_slack_urlsSql, map[string]*bintree{}}, }}, @@ -698,4 +699,3 @@ func _filePath(dir, name string) string { cannonicalName := strings.Replace(name, "\\", "/", -1) return filepath.Join(append([]string{dir}, strings.Split(cannonicalName, "/")...)...) } - diff --git a/strings/lowercase/lowercase_test.go b/strings/lowercase/lowercase_test.go index 5d50360..4fbc708 100644 --- a/strings/lowercase/lowercase_test.go +++ b/strings/lowercase/lowercase_test.go @@ -41,4 +41,4 @@ func TestEmpty(t *testing.T) { if l.String() != "" { t.Error("empty lowercase not handled correctly") } -} \ No newline at end of file +} diff --git a/usage/usage.go b/usage/usage.go index 2d1ad9b..f4a2867 100644 --- a/usage/usage.go +++ b/usage/usage.go @@ -23,7 +23,7 @@ import ( "sync" "time" - log "github.com/Sirupsen/logrus" + log "github.com/sirupsen/logrus" ) type usageType int diff --git a/usage/usage_test.go b/usage/usage_test.go index 5391c20..f7b08c0 100644 --- a/usage/usage_test.go +++ b/usage/usage_test.go @@ -19,8 +19,8 @@ See the License for the specific language governing permissions and limitations package usage import ( - "testing" "context" + "testing" ) func TestContextUnique(t *testing.T) { @@ -33,6 +33,6 @@ func TestContextUnique(t *testing.T) { } v2 := GetEventFromContext(c2) if v2 != "Hello" { - t.Errorf("Expected Hello, got %v",v2) + t.Errorf("Expected Hello, got %v", v2) } -} \ No newline at end of file +} diff --git a/web/approval.go b/web/approval.go index a348d57..4cd434a 100644 --- a/web/approval.go +++ b/web/approval.go @@ -32,7 +32,7 @@ import ( "github.com/capitalone/checks-out/set" "github.com/capitalone/checks-out/strings/lowercase" - log "github.com/Sirupsen/logrus" + log "github.com/sirupsen/logrus" ) // https://help.github.com/articles/closing-issues-via-commit-messages/ diff --git a/web/github_create.go b/web/github_create.go index 89ab143..0d41754 100644 --- a/web/github_create.go +++ b/web/github_create.go @@ -32,8 +32,8 @@ import ( "github.com/capitalone/checks-out/strings/lowercase" "github.com/capitalone/checks-out/usage" - log "github.com/Sirupsen/logrus" - "github.com/google/go-github/github" + "github.com/google/go-github/v30/github" + log "github.com/sirupsen/logrus" ) // TODO: move this into its own package when diff --git a/web/index.go b/web/index.go index b744599..497069d 100644 --- a/web/index.go +++ b/web/index.go @@ -23,8 +23,8 @@ import ( "github.com/capitalone/checks-out/router/middleware/session" "github.com/capitalone/checks-out/shared/token" - "github.com/gin-gonic/gin" "github.com/capitalone/checks-out/envvars" + "github.com/gin-gonic/gin" ) func Index(c *gin.Context) { diff --git a/web/login.go b/web/login.go index 19f55cc..e3a5305 100644 --- a/web/login.go +++ b/web/login.go @@ -26,7 +26,6 @@ import ( "net/http" "time" - log "github.com/Sirupsen/logrus" "github.com/capitalone/checks-out/envvars" "github.com/capitalone/checks-out/exterror" "github.com/capitalone/checks-out/model" @@ -35,6 +34,7 @@ import ( "github.com/capitalone/checks-out/shared/token" "github.com/capitalone/checks-out/store" "github.com/gin-gonic/gin" + log "github.com/sirupsen/logrus" ) // Login attempts to authorize a user via GitHub oauth2. If the user does not diff --git a/web/merge.go b/web/merge.go index 3cf4fb9..7ebe41b 100644 --- a/web/merge.go +++ b/web/merge.go @@ -21,9 +21,9 @@ package web import ( "context" - log "github.com/Sirupsen/logrus" "github.com/capitalone/checks-out/model" "github.com/capitalone/checks-out/remote" + log "github.com/sirupsen/logrus" ) func isBehind(c context.Context, user *model.User, repo *model.Repo, branch model.Branch) (bool, error) { diff --git a/web/notification.go b/web/notification.go index 19c0e9d..045b108 100644 --- a/web/notification.go +++ b/web/notification.go @@ -24,7 +24,7 @@ import ( "github.com/capitalone/checks-out/model" "github.com/capitalone/checks-out/notifier" - log "github.com/Sirupsen/logrus" + log "github.com/sirupsen/logrus" ) func handleApprovalNotification(hook *ApprovalHook, curCommentInfo *CurCommentInfo) *notifier.MessageWrapper { diff --git a/web/pr_hook.go b/web/pr_hook.go index 9b6db25..dfd0fd3 100644 --- a/web/pr_hook.go +++ b/web/pr_hook.go @@ -27,8 +27,8 @@ import ( "github.com/capitalone/checks-out/remote" "github.com/capitalone/checks-out/set" - log "github.com/Sirupsen/logrus" multierror "github.com/mspiegel/go-multierror" + log "github.com/sirupsen/logrus" ) type ApprovalOutput struct { diff --git a/web/static/static_gen.go b/web/static/static_gen.go index 16458c0..625a8ba 100644 --- a/web/static/static_gen.go +++ b/web/static/static_gen.go @@ -372,17 +372,17 @@ func AssetNames() []string { // _bindata is a table, holding each asset generator, mapped to its name. var _bindata = map[string]func() (*asset, error){ "files/angular-toggle-switch.min.js": filesAngularToggleSwitchMinJs, - "files/checksout.html": filesChecksoutHtml, - "files/checksout.js": filesChecksoutJs, - "files/favicon.ico": filesFaviconIco, - "files/images/maintainers.png": filesImagesMaintainersPng, - "files/images/meowser.png": filesImagesMeowserPng, - "files/images/pending_approval.png": filesImagesPending_approvalPng, + "files/checksout.html": filesChecksoutHtml, + "files/checksout.js": filesChecksoutJs, + "files/favicon.ico": filesFaviconIco, + "files/images/maintainers.png": filesImagesMaintainersPng, + "files/images/meowser.png": filesImagesMeowserPng, + "files/images/pending_approval.png": filesImagesPending_approvalPng, "files/images/received_approval.png": filesImagesReceived_approvalPng, - "files/logo.svg": filesLogoSvg, - "files/main_styles.css": filesMain_stylesCss, - "files/styles.css": filesStylesCss, - "files/toggle_switch.css": filesToggle_switchCss, + "files/logo.svg": filesLogoSvg, + "files/main_styles.css": filesMain_stylesCss, + "files/styles.css": filesStylesCss, + "files/toggle_switch.css": filesToggle_switchCss, } // AssetDir returns the file names below a certain @@ -424,21 +424,22 @@ type bintree struct { Func func() (*asset, error) Children map[string]*bintree } + var _bintree = &bintree{nil, map[string]*bintree{ "files": &bintree{nil, map[string]*bintree{ "angular-toggle-switch.min.js": &bintree{filesAngularToggleSwitchMinJs, map[string]*bintree{}}, - "checksout.html": &bintree{filesChecksoutHtml, map[string]*bintree{}}, - "checksout.js": &bintree{filesChecksoutJs, map[string]*bintree{}}, - "favicon.ico": &bintree{filesFaviconIco, map[string]*bintree{}}, + "checksout.html": &bintree{filesChecksoutHtml, map[string]*bintree{}}, + "checksout.js": &bintree{filesChecksoutJs, map[string]*bintree{}}, + "favicon.ico": &bintree{filesFaviconIco, map[string]*bintree{}}, "images": &bintree{nil, map[string]*bintree{ - "maintainers.png": &bintree{filesImagesMaintainersPng, map[string]*bintree{}}, - "meowser.png": &bintree{filesImagesMeowserPng, map[string]*bintree{}}, - "pending_approval.png": &bintree{filesImagesPending_approvalPng, map[string]*bintree{}}, + "maintainers.png": &bintree{filesImagesMaintainersPng, map[string]*bintree{}}, + "meowser.png": &bintree{filesImagesMeowserPng, map[string]*bintree{}}, + "pending_approval.png": &bintree{filesImagesPending_approvalPng, map[string]*bintree{}}, "received_approval.png": &bintree{filesImagesReceived_approvalPng, map[string]*bintree{}}, }}, - "logo.svg": &bintree{filesLogoSvg, map[string]*bintree{}}, - "main_styles.css": &bintree{filesMain_stylesCss, map[string]*bintree{}}, - "styles.css": &bintree{filesStylesCss, map[string]*bintree{}}, + "logo.svg": &bintree{filesLogoSvg, map[string]*bintree{}}, + "main_styles.css": &bintree{filesMain_stylesCss, map[string]*bintree{}}, + "styles.css": &bintree{filesStylesCss, map[string]*bintree{}}, "toggle_switch.css": &bintree{filesToggle_switchCss, map[string]*bintree{}}, }}, }} @@ -489,4 +490,3 @@ func _filePath(dir, name string) string { cannonicalName := strings.Replace(name, "\\", "/", -1) return filepath.Join(append([]string{dir}, strings.Split(cannonicalName, "/")...)...) } - diff --git a/web/status_hook.go b/web/status_hook.go index 36ccf17..dae2f94 100644 --- a/web/status_hook.go +++ b/web/status_hook.go @@ -22,10 +22,10 @@ import ( "context" "fmt" - log "github.com/Sirupsen/logrus" "github.com/capitalone/checks-out/model" "github.com/capitalone/checks-out/notifier" "github.com/capitalone/checks-out/remote" + log "github.com/sirupsen/logrus" ) type StatusResponse struct { diff --git a/web/tag.go b/web/tag.go index 82b0f3c..4bd4636 100644 --- a/web/tag.go +++ b/web/tag.go @@ -25,10 +25,10 @@ import ( "strings" "time" - log "github.com/Sirupsen/logrus" - "github.com/hashicorp/go-version" "github.com/capitalone/checks-out/model" "github.com/capitalone/checks-out/remote" + "github.com/hashicorp/go-version" + log "github.com/sirupsen/logrus" ) func tagIfEnabled(c context.Context, user *model.User, hook *StatusHook, diff --git a/web/template/template_gen.go b/web/template/template_gen.go index 0c6cc3b..5b645b6 100644 --- a/web/template/template_gen.go +++ b/web/template/template_gen.go @@ -203,9 +203,9 @@ func AssetNames() []string { // _bindata is a table, holding each asset generator, mapped to its name. var _bindata = map[string]func() (*asset, error){ - "files/brand.html": filesBrandHtml, - "files/error.html": filesErrorHtml, - "files/index.html": filesIndexHtml, + "files/brand.html": filesBrandHtml, + "files/error.html": filesErrorHtml, + "files/index.html": filesIndexHtml, "files/logout.html": filesLogoutHtml, } @@ -248,11 +248,12 @@ type bintree struct { Func func() (*asset, error) Children map[string]*bintree } + var _bintree = &bintree{nil, map[string]*bintree{ "files": &bintree{nil, map[string]*bintree{ - "brand.html": &bintree{filesBrandHtml, map[string]*bintree{}}, - "error.html": &bintree{filesErrorHtml, map[string]*bintree{}}, - "index.html": &bintree{filesIndexHtml, map[string]*bintree{}}, + "brand.html": &bintree{filesBrandHtml, map[string]*bintree{}}, + "error.html": &bintree{filesErrorHtml, map[string]*bintree{}}, + "index.html": &bintree{filesIndexHtml, map[string]*bintree{}}, "logout.html": &bintree{filesLogoutHtml, map[string]*bintree{}}, }}, }} @@ -303,4 +304,3 @@ func _filePath(dir, name string) string { cannonicalName := strings.Replace(name, "\\", "/", -1) return filepath.Join(append([]string{dir}, strings.Split(cannonicalName, "/")...)...) } - From 8c54d2584e3ab9363155d79510dc1c21e1f88094 Mon Sep 17 00:00:00 2001 From: Jon Bodner Date: Thu, 19 Mar 2020 16:02:45 -0400 Subject: [PATCH 3/3] fix Makefile to use simpler tooling. Update additional dependencies. --- .gitignore | 2 ++ Makefile | 33 ++++++++++----------------------- go.mod | 3 ++- go.sum | 4 ++++ 4 files changed, 18 insertions(+), 24 deletions(-) diff --git a/.gitignore b/.gitignore index 6122f25..b8bb2bb 100644 --- a/.gitignore +++ b/.gitignore @@ -8,3 +8,5 @@ checks-out.sqlite report.out report.xml *.iml +coverage.html +coverage.out \ No newline at end of file diff --git a/Makefile b/Makefile index 087e97d..f11cf30 100644 --- a/Makefile +++ b/Makefile @@ -6,14 +6,6 @@ endif # Propagate git revision number to version identifier VERSION:=${VERSION_TAG}+$(shell git rev-parse --short HEAD) -# directories and remove vendor directory -# used for running unit tests -NOVENDOR := $(shell go list -e ./... | grep -v /vendor/) - -# files and remove vendor directory, auto generated files, and mock files -# used for static analysis, code linting, and code formatting -NOVENDOR_FILES := $(shell find . -name "*.go" | grep -v /vendor/ | grep -v /mock/ | grep -v "_gen\.go" ) - all: build gen: gen-assets gen-migration @@ -25,22 +17,22 @@ gen-assets: gen-migration: go generate github.com/capitalone/checks-out/store/migration -build: +build: test @# static linking sqlite seems to break DNS go build --ldflags '-X github.com/capitalone/checks-out/version.Version=$(VERSION)' -o checks-out - go test -run ^$$ $(NOVENDOR) > /dev/null test: vet @# use redirect instead of tee to preserve exit code - go test -short -p=1 -cover $(NOVENDOR) -v > report.out; \ + go test -short -cover -v ./... > report.out; \ code=$$?; \ cat report.out; \ grep -e 'FAIL' report.out; \ exit $${code} +.PHONY: test test-complete: vet @# use redirect instead of tee to preserve exit code - GITHUB_TEST_ENABLE=1 go test -short -p=1 -cover $(NOVENDOR) -v > report.out; \ + GITHUB_TEST_ENABLE=1 go test -short -cover -v ./... > report.out; \ code=$$?; \ cat report.out; \ grep -e 'FAIL' report.out; \ @@ -49,24 +41,19 @@ test-complete: vet .PHONY: test-cover-html test-cover-html: - echo "mode: count" > coverage-all.out - echo "Packages: $(NOVENDOR)" - echo "VERSION: $(VERSION)" - $(foreach pkg,$(NOVENDOR), \ - echo ${pkg}; \ - go test -coverprofile=coverage.out -covermode=count ${pkg}; \ - tail -n +2 coverage.out >> coverage-all.out;) - go tool cover -html=coverage-all.out -o coverage.html + @echo "VERSION: $(VERSION)" + go test -coverprofile=coverage.out -covermode=count ./... + go tool cover -html=coverage.out -o coverage.html fmt: - for FILE in $(NOVENDOR_FILES); do go fmt $$FILE; done; + go fmt ./... vet: get-modules @echo 'Running go tool vet -shadow' - @for FILE in $(NOVENDOR_FILES); do go tool vet -shadow $$FILE || exit 1; done; + go vet ./... lint: get-modules - for FILE in $(NOVENDOR_FILES); do golint $$FILE; done; + golint ./... clean: rm -f checks-out report.out diff --git a/go.mod b/go.mod index 7d2b550..8a7fadc 100644 --- a/go.mod +++ b/go.mod @@ -31,7 +31,8 @@ require ( github.com/rubenv/sql-migrate v0.0.0-20200212082348-64f95ea68aa3 github.com/russross/meddler v0.0.0-20191023082315-51a972bb8fb2 github.com/sirupsen/logrus v1.4.2 - github.com/stretchr/testify v1.4.0 + github.com/stretchr/objx v0.2.0 // indirect + github.com/stretchr/testify v1.5.1 golang.org/x/crypto v0.0.0-20200317142112-1b76d66859c6 // indirect golang.org/x/net v0.0.0-20200301022130-244492dfa37a // indirect golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d diff --git a/go.sum b/go.sum index 879b1e7..3c75b63 100644 --- a/go.sum +++ b/go.sum @@ -148,10 +148,14 @@ github.com/spf13/viper v1.3.2/go.mod h1:ZiWeW+zYFKm7srdB9IoDzzZXaJaI5eL9QjNiN/DM github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.1.1 h1:2vfRuCMp5sSVIDSqO8oNnWJq7mPa6KVP3iPIwFBuy8A= github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/objx v0.2.0 h1:Hbg2NidpLE8veEBkEZTL3CvlkUIVzuU9jDplZO54c48= +github.com/stretchr/objx v0.2.0/go.mod h1:qt09Ya8vawLte6SNmTgCsAVtYtaKzEcn8ATUoHMkEqE= github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/stretchr/testify v1.4.0 h1:2E4SXV/wtOkTonXsotYi4li6zVWxYlZuYNCXe9XRJyk= github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= +github.com/stretchr/testify v1.5.1 h1:nOGnQDM7FYENwehXlg/kFVnos3rEvtKTjRvOWSzb6H4= +github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= github.com/ugorji/go v1.1.7 h1:/68gy2h+1mWMrwZFeD1kQialdSzAb432dtpeJ42ovdo= github.com/ugorji/go v1.1.7/go.mod h1:kZn38zHttfInRq0xu/PH0az30d+z6vm202qpg1oXVMw= github.com/ugorji/go/codec v0.0.0-20181204163529-d75b2dcb6bc8/go.mod h1:VFNgLljTbGfSG7qAOspJ7OScBnGdDN/yBr0sguwnwf0=