~edwargix/git.sr.ht

e42fe33f2f7748c436f042a9808dea5328114e99 — Drew DeVault 4 years ago bae0f94
update-hook: -o debug: print response from builds
2 files changed, 5 insertions(+), 2 deletions(-)

M gitsrht-update-hook/post-update.go
M gitsrht-update-hook/submitter.go
M gitsrht-update-hook/post-update.go => gitsrht-update-hook/post-update.go +1 -0
@@ 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)

M gitsrht-update-hook/submitter.go => gitsrht-update-hook/submitter.go +4 -2
@@ 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),
		})
	}