From e42fe33f2f7748c436f042a9808dea5328114e99 Mon Sep 17 00:00:00 2001 From: Drew DeVault Date: Tue, 4 Aug 2020 10:36:25 -0400 Subject: [PATCH] update-hook: -o debug: print response from builds --- gitsrht-update-hook/post-update.go | 1 + gitsrht-update-hook/submitter.go | 6 ++++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/gitsrht-update-hook/post-update.go b/gitsrht-update-hook/post-update.go index 3a0d1b8..11422b7 100644 --- a/gitsrht-update-hook/post-update.go +++ b/gitsrht-update-hook/post-update.go @@ -259,6 +259,7 @@ func postUpdate() { logger.Printf("Submitted %d builds for %s", len(results), refname) for _, result := range results { + log.Printf("[debug] builds.sr.ht response: \n%s", result.Response) log.Printf("\033[94m%s\033[0m [%s]", result.Url, result.Name) } nbuilds += len(results) diff --git a/gitsrht-update-hook/submitter.go b/gitsrht-update-hook/submitter.go index 649c765..097aa75 100644 --- a/gitsrht-update-hook/submitter.go +++ b/gitsrht-update-hook/submitter.go @@ -208,8 +208,9 @@ func (submitter GitBuildSubmitter) GetOwnerName() string { type BuildSubmission struct { // TODO: Move errors into this struct and set up per-submission error // tracking - Name string - Url string + Name string + Response string + Url string } func configureRequestAuthorization(submitter BuildSubmitter, @@ -319,6 +320,7 @@ func SubmitBuild(submitter BuildSubmitter) ([]BuildSubmission, error) { submitter.GetBuildsOrigin(), submitter.GetOwnerName(), job.Id), + Response: string(respBytes), }) } -- 2.38.4