diff --git a/http.go b/http.go index c47269d..e333185 100644 --- a/http.go +++ b/http.go @@ -17,7 +17,11 @@ func httpPost(url string, data []byte) ([]byte, error) { var req *http.Request req, err = http.NewRequest(http.MethodPost, url, bytes.NewBuffer(data)) - // log.Info("httpPost() with len", len(data), "url", url) + log.Info("httpPost() with len", len(data), "url", url) + if err != nil { + log.Error(err) + return nil, err + } usr, _ := user.Current() req.Header.Set("author", usr.Username) @@ -38,6 +42,7 @@ func httpPost(url string, data []byte) ([]byte, error) { return body, err } + log.Info("gitpb.httpPost() worked", url) return body, nil } @@ -53,8 +58,10 @@ func (r *Repos) SubmitReposPB(url string) (*Repos, error) { log.Info("httpPost() failed:", err) return nil, err } + log.Info("httpPost() worked with url:", url, "len(body) =", len(body)) if err := r.Unmarshal(body); err != nil { - log.Info("Unmarshal() failed:", err) + log.Info("SubmitReposPB() Unmarshal() failed:", err) + log.Printf("%s\n", body) return nil, err } diff --git a/reloadTags.go b/reloadTags.go index 9017171..ce25b0c 100644 --- a/reloadTags.go +++ b/reloadTags.go @@ -11,6 +11,13 @@ import ( timestamppb "google.golang.org/protobuf/types/known/timestamppb" ) +// redo this. use go-git2 ? +func (repo *Repo) allCommits() error { + return nil +} + +/* +// this is dumb func (repo *Repo) AllCommits() error { // tags := []string{"cd", "%(creatordate)", "%(*authordate)", "%(refname)", "%(subject)"} // format := strings.Join(tags, "_,,,_%") @@ -27,6 +34,7 @@ func (repo *Repo) AllCommits() error { repo.Times.NewestCommit = timestamppb.New(tmp) return nil } +*/ // reload the tags func (repo *Repo) reloadGitTags() error {