diff options
| author | Jeff Carr <[email protected]> | 2024-11-22 21:05:09 -0600 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2024-11-22 21:05:09 -0600 |
| commit | d9b91402cfd0e5977cfa502467b09c9e17e5ec77 (patch) | |
| tree | a3c415115b1a9eccd695109d6336d201bc1127b5 | |
| parent | 1735ae5826f9c5d52ca09c78cad9d6f22f69d7de (diff) | |
repos.FindByName()
| -rw-r--r-- | Makefile | 3 | ||||
| -rw-r--r-- | http.go | 16 |
2 files changed, 17 insertions, 2 deletions
@@ -71,6 +71,9 @@ curl-setCurrent-go-wit-com-gui: curl-setTargetVersion-virtigo-v0.1.1: curl --silent http://localhost:9419/setTargetVersion?version=v0.1.1 +curl-setTargetVersion-go-clone-v0.6: + curl --silent "http://localhost:9419/setTargetVersion?repo=go-clone&version=v0.6" + curl-incrementAllTargetVersions: curl --silent http://localhost:9419/setAllTargetVersions @@ -92,7 +92,7 @@ func okHandler(w http.ResponseWriter, r *http.Request) { log.Info("version: " + version) log.Info("comment: " + comment) - repo := me.repos.View.FindRepoByName(repoName) + repo := me.repos.View.FindByName(repoName) if repo == nil { log.Info("FindRepoByName() returned nil") return @@ -120,11 +120,23 @@ func okHandler(w http.ResponseWriter, r *http.Request) { case "/setTargetVersion": log.Info("repo: " + repoName) log.Info("version: " + version) + if repoName != "" { + repo := me.repos.View.FindByName(repoName) + if repo == nil { + log.Info("could not find repo", repoName) + } else { + log.Info("setting target version", version) + repo.Status.SetTargetVersion(version) + } + return + } + if me.current == nil { log.Info("me.current == nil") return } me.current.Status.SetTargetVersion(version) + return case "/setAllTargetVersions": log.Info("version: " + version) @@ -141,7 +153,7 @@ func okHandler(w http.ResponseWriter, r *http.Request) { } } case "/whitelist": - repo := me.repos.View.FindRepoByName(repoName) + repo := me.repos.View.FindByName(repoName) if repo == nil { log.Info("FindRepoByName() returned nil") return |
