From e8c41676ea2adff7b846936e6b874b51159e970f Mon Sep 17 00:00:00 2001 From: david may <1301201+wass3r@users.noreply.github.com> Date: Mon, 10 Jun 2024 12:10:12 -0500 Subject: [PATCH] fix(deps): switch giturls lib (#564) --- go.mod | 2 +- go.sum | 4 ++-- internal/git.go | 4 +--- 3 files changed, 4 insertions(+), 6 deletions(-) diff --git a/go.mod b/go.mod index 4fde9a30..ca4d7c2b 100644 --- a/go.mod +++ b/go.mod @@ -8,6 +8,7 @@ require ( github.com/Masterminds/semver/v3 v3.2.1 github.com/alecthomas/chroma/v2 v2.14.0 github.com/buildkite/yaml v0.0.0-20230306222819-0e4e032d4835 + github.com/chainguard-dev/git-urls v1.0.2 github.com/cli/browser v1.3.0 github.com/davecgh/go-spew v1.1.1 github.com/dustin/go-humanize v1.0.1 @@ -24,7 +25,6 @@ require ( github.com/sirupsen/logrus v1.9.3 github.com/spf13/afero v1.11.0 github.com/urfave/cli/v2 v2.27.2 - github.com/whilp/git-urls v1.0.0 gopkg.in/yaml.v3 v3.0.1 ) diff --git a/go.sum b/go.sum index 99ce1be0..2af5dac3 100644 --- a/go.sum +++ b/go.sum @@ -39,6 +39,8 @@ github.com/bytedance/sonic/loader v0.1.1 h1:c+e5Pt1k/cy5wMveRDyk2X4B9hF4g7an8N3z github.com/bytedance/sonic/loader v0.1.1/go.mod h1:ncP89zfokxS5LZrJxl5z0UJcsk4M4yY2JpfqGeCtNLU= github.com/cenkalti/backoff/v4 v4.2.1 h1:y4OZtCnogmCPw98Zjyt5a6+QwPLGkiQsYW5oUqylYbM= github.com/cenkalti/backoff/v4 v4.2.1/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE= +github.com/chainguard-dev/git-urls v1.0.2 h1:pSpT7ifrpc5X55n4aTTm7FFUE+ZQHKiqpiwNkJrVcKQ= +github.com/chainguard-dev/git-urls v1.0.2/go.mod h1:rbGgj10OS7UgZlbzdUQIQpT0k/D4+An04HJY7Ol+Y/o= github.com/chzyer/logex v1.1.10 h1:Swpa1K6QvQznwJRcfTfQJmTE72DqScAa40E+fbHEXEE= github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e h1:fY5BOSpyZCqRo5OhCuC+XN+r/bBCmeuuJtjz+bCNIf8= @@ -328,8 +330,6 @@ github.com/ugorji/go/codec v1.2.12 h1:9LC83zGrHhuUA9l16C9AHXAqEV/2wBQ4nkvumAE65E github.com/ugorji/go/codec v1.2.12/go.mod h1:UNopzCgEMSXjBc6AOMqYvWC1ktqTAfzJZUZgYf6w6lg= github.com/urfave/cli/v2 v2.27.2 h1:6e0H+AkS+zDckwPCUrZkKX38mRaau4nL2uipkJpbkcI= github.com/urfave/cli/v2 v2.27.2/go.mod h1:g0+79LmHHATl7DAcHO99smiR/T7uGLw84w8Y42x+4eM= -github.com/whilp/git-urls v1.0.0 h1:95f6UMWN5FKW71ECsXRUd3FVYiXdrE7aX4NZKcPmIjU= -github.com/whilp/git-urls v1.0.0/go.mod h1:J16SAmobsqc3Qcy98brfl5f5+e0clUvg1krgwk/qCfE= 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= github.com/xrash/smetrics v0.0.0-20240312152122-5f08fbb34913 h1:+qGGcbkzsfDQNPPe9UDgpxAWQrhbbBXOYJFQDq/dtJw= diff --git a/internal/git.go b/internal/git.go index 0e0550b4..27494ff7 100644 --- a/internal/git.go +++ b/internal/git.go @@ -6,10 +6,10 @@ import ( "strconv" "strings" + giturls "github.com/chainguard-dev/git-urls" "github.com/go-git/go-git/v5" "github.com/sirupsen/logrus" "github.com/urfave/cli/v2" - giturls "github.com/whilp/git-urls" ) // SetGitConfigContext attempts to set the org and repo @@ -49,7 +49,6 @@ func SetGitConfigContext(c *cli.Context) { func GetGitConfigOrg(path string) string { // open repository r, err := git.PlainOpen(path) - // on failure, return empty string to allow for // potential manual setting of org to process if err != nil { @@ -86,7 +85,6 @@ func GetGitConfigOrg(path string) string { func GetGitConfigRepo(path string) string { // open repository r, err := git.PlainOpen(path) - // on failure, return empty string to allow for // potential manual setting of org to process if err != nil {