From 95fd6ca05a28774ad374801984a4f62c202835d3 Mon Sep 17 00:00:00 2001 From: Jeff Carr Date: Tue, 13 Feb 2024 16:17:29 -0600 Subject: check go.wit.com is mapping a repo --- gitConfig.go | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'gitConfig.go') diff --git a/gitConfig.go b/gitConfig.go index 295a583..881d330 100644 --- a/gitConfig.go +++ b/gitConfig.go @@ -191,6 +191,18 @@ func (rs *RepoStatus) readGitConfig() error { return nil } +func (rs *RepoStatus) GitURL() string { + origin, ok := rs.gitConfig.remotes["origin"] + if ok { + return origin.url + } + for i, s := range rs.gitConfig.remotes { + log.Log(WARN, "remote:", i, s.url) + } + log.Log(WARN, "GitURL() repo has non-standard origin or is not uploaded") + return "" +} + // this checks to see if the repo is truly not dependent on _anything_ else // like spew or lib/widget func (rs *RepoStatus) CheckPrimativeGoMod() bool { -- cgit v1.2.3