From 98312966ea976cc3647b8db6876679902067db7b Mon Sep 17 00:00:00 2001 From: Zlatko Bratkovic Date: Mon, 17 Feb 2025 10:40:48 +0100 Subject: [PATCH 1/4] BUG/MINOR: allow commit check to run with one commit only when starting repository, only one author will be present (only one commit), account for that and for similar situation where only one author exist --- check.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/check.go b/check.go index 4392c99..53dee42 100644 --- a/check.go +++ b/check.go @@ -361,9 +361,13 @@ func getLocalCommitData() ([]string, []string, []map[string]string, error) { diffs := []map[string]string{} committer := "" var commit1 *object.Commit + var oldestCommit *object.Commit var commit2 *object.Commit for { commit, err := iter.Next() + if commit != nil { + oldestCommit = commit + } if err == io.EOF { break } @@ -399,6 +403,9 @@ func getLocalCommitData() ([]string, []string, []map[string]string, error) { // Get the changes (diff) between the two commits tree1, _ := commit1.Tree() + if commit2 == nil { + commit2 = oldestCommit + } tree2, _ := commit2.Tree() changes, err := object.DiffTree(tree2, tree1) if err != nil { From f5d85e8260c41f2cd0060e6a86baae5a0b431490 Mon Sep 17 00:00:00 2001 From: Zlatko Bratkovic Date: Mon, 17 Feb 2025 10:46:30 +0100 Subject: [PATCH 2/4] BUILD/MAJOR: use go 1.24 as minimum version --- go.mod | 17 +++++++++-------- go.sum | 39 ++++++++++++++++++++------------------- 2 files changed, 29 insertions(+), 27 deletions(-) diff --git a/go.mod b/go.mod index 53f0918..c06e08e 100644 --- a/go.mod +++ b/go.mod @@ -1,19 +1,20 @@ module github.com/haproxytech/check-commit/v5 -go 1.23 +go 1.24.0 require ( github.com/fatih/camelcase v1.0.0 github.com/google/go-github/v56 v56.0.0 - github.com/xanzy/go-gitlab v0.110.0 - golang.org/x/oauth2 v0.23.0 + github.com/xanzy/go-gitlab v0.115.0 + golang.org/x/oauth2 v0.26.0 gopkg.in/src-d/go-git.v4 v4.13.1 gopkg.in/yaml.v3 v3.0.1 ) require ( - github.com/Microsoft/go-winio v0.5.2 // indirect + github.com/Microsoft/go-winio v0.6.2 // indirect github.com/emirpasic/gods v1.18.1 // indirect + github.com/google/go-cmp v0.6.0 // indirect github.com/google/go-querystring v1.1.0 // indirect github.com/hashicorp/go-cleanhttp v0.5.2 // indirect github.com/hashicorp/go-retryablehttp v0.7.7 // indirect @@ -23,10 +24,10 @@ require ( github.com/sergi/go-diff v1.3.1 // indirect github.com/src-d/gcfg v1.4.0 // indirect github.com/xanzy/ssh-agent v0.3.3 // indirect - golang.org/x/crypto v0.28.0 // indirect - golang.org/x/net v0.30.0 // indirect - golang.org/x/sys v0.26.0 // indirect - golang.org/x/time v0.7.0 // indirect + golang.org/x/crypto v0.33.0 // indirect + golang.org/x/net v0.35.0 // indirect + golang.org/x/sys v0.30.0 // indirect + golang.org/x/time v0.10.0 // indirect gopkg.in/src-d/go-billy.v4 v4.3.2 // indirect gopkg.in/warnings.v0 v0.1.2 // indirect ) diff --git a/go.sum b/go.sum index db8493e..e517ec3 100644 --- a/go.sum +++ b/go.sum @@ -1,5 +1,6 @@ -github.com/Microsoft/go-winio v0.5.2 h1:a9IhgEQBCUEk6QCdml9CiJGhAws+YwffDHEMp1VMrpA= github.com/Microsoft/go-winio v0.5.2/go.mod h1:WpS1mjBmmwHBEWmogvA2mj8546UReBk4v8QkMxJ6pZY= +github.com/Microsoft/go-winio v0.6.2 h1:F2VQgta7ecxGYO8k3ZZz3RS8fVIXVxONVUPlNERoyfY= +github.com/Microsoft/go-winio v0.6.2/go.mod h1:yd8OoFMLzJbo9gZq8j5qaps8bJ9aShtEA8Ipt1oGCvU= 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/anmitsu/go-shlex v0.0.0-20161002113705-648efa622239 h1:kFOfPq6dUM1hTo4JG6LR5AXSUEsOjtdm0kw0FtQtMJA= @@ -22,8 +23,8 @@ github.com/gliderlabs/ssh v0.2.2 h1:6zsha5zo/TWhRhwqCD3+EarCAgZ2yN28ipRnGPnwkI0= github.com/gliderlabs/ssh v0.2.2/go.mod h1:U7qILu1NlMHj9FlMhZLlkCdDnU1DBEAqr0aevW3Awn0= github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= -github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= +github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= +github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/go-github/v56 v56.0.0 h1:TysL7dMa/r7wsQi44BjqlwaHvwlFlqkK8CtBWCX3gb4= github.com/google/go-github/v56 v56.0.0/go.mod h1:D8cdcX98YWJvi7TLo7zM4/h8ZTx6u6fwGEkCdisopo0= github.com/google/go-querystring v1.1.0 h1:AnCroh3fv4ZBgVIf1Iwtovgjaw/GiKJo8M8yD/fhyJ8= @@ -70,8 +71,8 @@ github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UV github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= github.com/stretchr/testify v1.8.1 h1:w7B6lhMri9wdJUVmEZPGGhZzrYTPvgJArz7wNPgYKsk= github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= -github.com/xanzy/go-gitlab v0.110.0 h1:hsFIFp01v/0D0sdUXoZfRk6CROzZbHQplk6NzKSFKhc= -github.com/xanzy/go-gitlab v0.110.0/go.mod h1:wKNKh3GkYDMOsGmnfuX+ITCmDuSDWFO0G+C4AygL9RY= +github.com/xanzy/go-gitlab v0.115.0 h1:6DmtItNcVe+At/liXSgfE/DZNZrGfalQmBRmOcJjOn8= +github.com/xanzy/go-gitlab v0.115.0/go.mod h1:5XCDtM7AM6WMKmfDdOiEpyRWUqui2iS9ILfvCZ2gJ5M= github.com/xanzy/ssh-agent v0.2.1/go.mod h1:mLlQY/MoOhWBj+gOGMQkOeiEvkx+8pJSI+0Bx9h2kr4= github.com/xanzy/ssh-agent v0.3.3 h1:+/15pJfg/RsTxqYcX6fHqOXZwwMP+2VyYWJeWM2qQFM= github.com/xanzy/ssh-agent v0.3.3/go.mod h1:6dzNDKs0J9rVPHPhaGCukekBHKqfl+L3KghI1Bc68Uw= @@ -79,16 +80,16 @@ golang.org/x/crypto v0.0.0-20190219172222-a4c6cb3142f2/go.mod h1:6SG95UA2DQfeDnf golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20190701094942-4def268fd1a4/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20220622213112-05595931fe9d/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= -golang.org/x/crypto v0.28.0 h1:GBDwsMXVQi34v5CCYUm2jkJvu4cbtru2U4TN2PSyQnw= -golang.org/x/crypto v0.28.0/go.mod h1:rmgy+3RHxRZMyY0jjAJShp2zgEdOqj2AO7U0pYmeQ7U= +golang.org/x/crypto v0.33.0 h1:IOBPskki6Lysi0lo9qQvbxiQ+FvsCC/YWOecCHAixus= +golang.org/x/crypto v0.33.0/go.mod h1:bVdXmD7IV/4GdElGPozy6U7lWdRXA4qyRVGJV57uQ5M= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190724013045-ca1201d0de80/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.30.0 h1:AcW1SDZMkb8IpzCdQUaIq2sP4sZ4zw+55h6ynffypl4= -golang.org/x/net v0.30.0/go.mod h1:2wGyMJ5iFasEhkwi13ChkO/t1ECNC4X4eBKkVFyYFlU= -golang.org/x/oauth2 v0.23.0 h1:PbgcYx2W7i4LvjJWEbf0ngHV6qJYr86PkAV3bXdLEbs= -golang.org/x/oauth2 v0.23.0/go.mod h1:XYTD2NtWslqkgxebSiOHnXEap4TF09sJSc7H1sXbhtI= +golang.org/x/net v0.35.0 h1:T5GQRQb2y08kTAByq9L4/bz8cipCdA8FbRTXewonqY8= +golang.org/x/net v0.35.0/go.mod h1:EglIi67kWsHKlRzzVMUD93VMSWGFOMSZgxFjparz1Qk= +golang.org/x/oauth2 v0.26.0 h1:afQXWNNaeC4nvZ0Ed9XvCCzXM6UHJG7iCg0W4fPqSBE= +golang.org/x/oauth2 v0.26.0/go.mod h1:XYTD2NtWslqkgxebSiOHnXEap4TF09sJSc7H1sXbhtI= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= 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= @@ -100,18 +101,18 @@ golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.26.0 h1:KHjCJyddX0LoSTb3J+vWpupP9p0oznkqVk/IfjymZbo= -golang.org/x/sys v0.26.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.30.0 h1:QjkSwP/36a20jFYWkSue1YwXzLmsV5Gfq7Eiy72C1uc= +golang.org/x/sys v0.30.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= -golang.org/x/term v0.25.0 h1:WtHI/ltw4NvSUig5KARz9h521QvRC8RmF/cuYqifU24= -golang.org/x/term v0.25.0/go.mod h1:RPyXicDX+6vLxogjjRxjgD2TKtmAO6NZBsBRfrOLu7M= +golang.org/x/term v0.29.0 h1:L6pJp37ocefwRRtYPKSWOWzOtWSxVajvz2ldH/xi3iU= +golang.org/x/term v0.29.0/go.mod h1:6bl4lRlvVuDgSf3179VpIxBF0o10JUpXWOnI7nErv7s= 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/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.19.0 h1:kTxAhCbGbxhK0IwgSKiMO5awPoDQ0RpfiVYBfK860YM= -golang.org/x/text v0.19.0/go.mod h1:BuEKDfySbSR4drPmRPG/7iBdf8hvFMuRexcpahXilzY= -golang.org/x/time v0.7.0 h1:ntUhktv3OPE6TgYxXWv9vKvUSJyIFJlyohwbkEwPrKQ= -golang.org/x/time v0.7.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM= +golang.org/x/text v0.22.0 h1:bofq7m3/HAFvbF51jz3Q9wLg3jkvSPuiZu/pD1XwgtM= +golang.org/x/text v0.22.0/go.mod h1:YRoo4H8PVmsu+E3Ou7cqLVH8oXWIHVoX0jqUWALQhfY= +golang.org/x/time v0.10.0 h1:3usCWA8tQn0L8+hFJQNgzpWbd89begxN66o1Ojdn5L4= +golang.org/x/time v0.10.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190729092621-ff9f1409240a/go.mod h1:jcCCGcm9btYwXyDqrUWc6MKQKKGJCWEQ3AfLSRIbEuI= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= From 5fdd34c015220bf5e5748e52973be0a5638213f0 Mon Sep 17 00:00:00 2001 From: Zlatko Bratkovic Date: Mon, 17 Feb 2025 11:25:13 +0100 Subject: [PATCH 3/4] MAJOR: allow reading allowed list from a remote json file --- .aspell.yml | 3 +++ aspell/aspell.go | 17 ++++++++---- aspell/new.go | 14 ++++++++++ aspell/remote.go | 68 ++++++++++++++++++++++++++++++++++++++++++++++++ go.mod | 1 + go.sum | 2 ++ main.go | 2 ++ 7 files changed, 102 insertions(+), 5 deletions(-) create mode 100644 aspell/remote.go diff --git a/.aspell.yml b/.aspell.yml index 83f1e10..b579951 100644 --- a/.aspell.yml +++ b/.aspell.yml @@ -30,3 +30,6 @@ allowed: - devel - ioutil - defaultconf + - json + - req + - nallowed diff --git a/aspell/aspell.go b/aspell/aspell.go index cb950be..dcd44d9 100644 --- a/aspell/aspell.go +++ b/aspell/aspell.go @@ -14,12 +14,19 @@ import ( "github.com/fatih/camelcase" ) +type RemoteFile struct { + URL string `yaml:"url"` + HeaderFromENV string `yaml:"header_from_env"` + AllowedItemsKey string `yaml:"allowed_items_key"` +} + type Aspell struct { - Mode mode `yaml:"mode"` - MinLength int `yaml:"min_length"` - IgnoreFiles []string `yaml:"ignore_files"` - AllowedWords []string `yaml:"allowed"` - HelpText string `yaml:"-"` + Mode mode `yaml:"mode"` + RemoteFile RemoteFile `yaml:"remote_file"` + MinLength int `yaml:"min_length"` + IgnoreFiles []string `yaml:"ignore_files"` + AllowedWords []string `yaml:"allowed"` + HelpText string `yaml:"-"` } var ( diff --git a/aspell/new.go b/aspell/new.go index 64f6e5c..e77608a 100644 --- a/aspell/new.go +++ b/aspell/new.go @@ -24,9 +24,20 @@ func New(filename string) (Aspell, error) { return Aspell{}, err } + var extraAllowedWords []string + if aspell.RemoteFile.URL != "" { + extraAllowedWords, err = fetchRemoteFile(aspell) + if err != nil { + return Aspell{}, err + } + } + for i, word := range aspell.AllowedWords { aspell.AllowedWords[i] = strings.ToLower(word) } + for _, word := range extraAllowedWords { + aspell.AllowedWords = append(aspell.AllowedWords, strings.ToLower(word)) + } if aspell.MinLength < 1 { aspell.MinLength = 3 @@ -59,6 +70,9 @@ allowed: - config ` } + if aspell.RemoteFile.URL != "" { + aspell.HelpText += fmt.Sprintf("\n\nallowed words can be added to remote file:\n url: %s\n", aspell.RemoteFile.URL) + } ignoreFiles := []string{"go.mod", "go.sum"} for _, file := range ignoreFiles { diff --git a/aspell/remote.go b/aspell/remote.go new file mode 100644 index 0000000..8fded05 --- /dev/null +++ b/aspell/remote.go @@ -0,0 +1,68 @@ +package aspell + +import ( + "encoding/json" + "net/http" + "os" + "strings" + + "gopkg.in/yaml.v3" +) + +func fetchRemoteFile(aspell Aspell) ([]string, error) { + url := aspell.RemoteFile.URL + if url == "" { + return []string{}, nil + } + + req, err := http.NewRequest("GET", url, nil) + if err != nil { + return nil, err + } + + if aspell.RemoteFile.HeaderFromENV != "" { + envValue := os.Getenv(aspell.RemoteFile.HeaderFromENV) + req.Header.Set(aspell.RemoteFile.HeaderFromENV, envValue) + } + + client := &http.Client{} + resp, err := client.Do(req) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + var data map[string]interface{} + err = json.NewDecoder(resp.Body).Decode(&data) + if err != nil { + return nil, err + } + + var allowedWords []string + + items, ok := data[aspell.RemoteFile.AllowedItemsKey].([]interface{}) + if !ok { + content, ok := data[aspell.RemoteFile.AllowedItemsKey].(string) + if !ok { + return nil, nil + } + if strings.HasPrefix(content, "```yaml\n") && strings.HasSuffix(content, "\n```") { + content = strings.TrimPrefix(content, "```yaml\n") + content = strings.TrimSuffix(content, "\n```") + err = yaml.Unmarshal([]byte(content), &allowedWords) + if err != nil { + return nil, err + } + + return allowedWords, nil + } + allowedWords = strings.Split(content, "\n") + } + + for _, item := range items { + allowedWords = append(allowedWords, item.(string)) + } + + return allowedWords, nil +} diff --git a/go.mod b/go.mod index c06e08e..413d91d 100644 --- a/go.mod +++ b/go.mod @@ -5,6 +5,7 @@ go 1.24.0 require ( github.com/fatih/camelcase v1.0.0 github.com/google/go-github/v56 v56.0.0 + github.com/joho/godotenv v1.5.1 github.com/xanzy/go-gitlab v0.115.0 golang.org/x/oauth2 v0.26.0 gopkg.in/src-d/go-git.v4 v4.13.1 diff --git a/go.sum b/go.sum index e517ec3..7f35ca3 100644 --- a/go.sum +++ b/go.sum @@ -38,6 +38,8 @@ github.com/hashicorp/go-retryablehttp v0.7.7/go.mod h1:pkQpWZeYWskR+D1tR2O5OcBFO github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 h1:BQSFePA1RWJOlocH6Fxy8MmwDt+yVQYULKfN0RoTN8A= github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99/go.mod h1:1lJo3i6rXxKeerYnT8Nvf0QmHCRC1n8sfWVwXF2Frvo= github.com/jessevdk/go-flags v1.4.0/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= +github.com/joho/godotenv v1.5.1 h1:7eLL/+HRGLY0ldzfGMeQkb7vMd0as4CfYvUVzLqw0N0= +github.com/joho/godotenv v1.5.1/go.mod h1:f4LDr5Voq0i2e/R5DDNOoa2zzDfwtkZa6DnEwAbqwq4= github.com/kevinburke/ssh_config v0.0.0-20190725054713-01f96b0aa0cd/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= diff --git a/main.go b/main.go index 43469b1..1340dea 100644 --- a/main.go +++ b/main.go @@ -8,9 +8,11 @@ import ( "github.com/haproxytech/check-commit/v5/aspell" "github.com/haproxytech/check-commit/v5/version" + "github.com/joho/godotenv" ) func main() { + _ = godotenv.Load(".env") err := version.Set() if err != nil { log.Fatal(err) From c4b2098c730e6329141ec0fcc32db8990ea4f58c Mon Sep 17 00:00:00 2001 From: Zlatko Bratkovic Date: Mon, 17 Feb 2025 11:42:55 +0100 Subject: [PATCH 4/4] BUILD/MINOR: update gitlab api library to gitlab.com/gitlab-org/api/client-go --- check.go | 2 +- go.mod | 2 +- go.sum | 8 ++++---- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/check.go b/check.go index 53dee42..0b9f0d7 100644 --- a/check.go +++ b/check.go @@ -16,8 +16,8 @@ import ( "unicode/utf8" "github.com/google/go-github/v56/github" + gitlab "gitlab.com/gitlab-org/api/client-go" - "github.com/xanzy/go-gitlab" "golang.org/x/oauth2" git "gopkg.in/src-d/go-git.v4" "gopkg.in/src-d/go-git.v4/plumbing/format/diff" diff --git a/go.mod b/go.mod index 413d91d..4014863 100644 --- a/go.mod +++ b/go.mod @@ -6,7 +6,7 @@ require ( github.com/fatih/camelcase v1.0.0 github.com/google/go-github/v56 v56.0.0 github.com/joho/godotenv v1.5.1 - github.com/xanzy/go-gitlab v0.115.0 + gitlab.com/gitlab-org/api/client-go v0.123.0 golang.org/x/oauth2 v0.26.0 gopkg.in/src-d/go-git.v4 v4.13.1 gopkg.in/yaml.v3 v3.0.1 diff --git a/go.sum b/go.sum index 7f35ca3..52ec62d 100644 --- a/go.sum +++ b/go.sum @@ -71,13 +71,13 @@ github.com/stretchr/objx v0.2.0/go.mod h1:qt09Ya8vawLte6SNmTgCsAVtYtaKzEcn8ATUoH 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/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= -github.com/stretchr/testify v1.8.1 h1:w7B6lhMri9wdJUVmEZPGGhZzrYTPvgJArz7wNPgYKsk= -github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= -github.com/xanzy/go-gitlab v0.115.0 h1:6DmtItNcVe+At/liXSgfE/DZNZrGfalQmBRmOcJjOn8= -github.com/xanzy/go-gitlab v0.115.0/go.mod h1:5XCDtM7AM6WMKmfDdOiEpyRWUqui2iS9ILfvCZ2gJ5M= +github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= +github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= github.com/xanzy/ssh-agent v0.2.1/go.mod h1:mLlQY/MoOhWBj+gOGMQkOeiEvkx+8pJSI+0Bx9h2kr4= github.com/xanzy/ssh-agent v0.3.3 h1:+/15pJfg/RsTxqYcX6fHqOXZwwMP+2VyYWJeWM2qQFM= github.com/xanzy/ssh-agent v0.3.3/go.mod h1:6dzNDKs0J9rVPHPhaGCukekBHKqfl+L3KghI1Bc68Uw= +gitlab.com/gitlab-org/api/client-go v0.123.0 h1:W3LZ5QNyiSCJA0Zchkwz8nQIUzOuDoSWMZtRDT5DjPI= +gitlab.com/gitlab-org/api/client-go v0.123.0/go.mod h1:Jh0qjLILEdbO6z/OY94RD+3NDQRUKiuFSFYozN6cpKM= golang.org/x/crypto v0.0.0-20190219172222-a4c6cb3142f2/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-20190701094942-4def268fd1a4/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=