Skip to content

Commit

Permalink
fix(deps): switch giturls lib (#564)
Browse files Browse the repository at this point in the history
  • Loading branch information
wass3r authored Jun 10, 2024
1 parent 710f373 commit e8c4167
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 6 deletions.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
)

Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -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=
Expand Down Expand Up @@ -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=
Expand Down
4 changes: 1 addition & 3 deletions internal/git.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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 {
Expand Down Expand Up @@ -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 {
Expand Down

0 comments on commit e8c4167

Please sign in to comment.