MCPcopy Index your code
hub / github.com/coder/coder / checkCoderRepo

Function checkCoderRepo

scripts/release/main.go:137–146  ·  view source on GitHub ↗
(path string)

Source from the content-addressed store, hash-verified

135}
136
137func checkCoderRepo(path string) error {
138 remote, err := run("git", "-C", path, "remote", "get-url", "origin")
139 if err != nil {
140 return xerrors.Errorf("get remote failed: %w", err)
141 }
142 if !strings.Contains(remote, "github.com") || !strings.Contains(remote, "coder/coder") {
143 return xerrors.Errorf("origin is not set to the coder/coder repository on github.com")
144 }
145 return nil
146}
147
148type releaseCommand struct {
149 fs afero.Fs

Callers 1

mainFunction · 0.85

Calls 3

runFunction · 0.70
ErrorfMethod · 0.45
ContainsMethod · 0.45

Tested by

no test coverage detected