Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make hook status printing configurable with delay #9641

Merged
merged 9 commits into from
Jan 12, 2020
Prev Previous commit
Next Next commit
Apply suggestions from code review
  • Loading branch information
zeripath committed Jan 11, 2020
commit 6bc78103406167c204941a4325c072b865e82ac6
8 changes: 4 additions & 4 deletions cmd/hook.go
Original file line number Diff line number Diff line change
Expand Up @@ -353,7 +353,7 @@ Gitea or set your environment appropriately.`, "")
hookOptions.RefFullNames = refFullNames
resp, err := private.HookPostReceive(repoUser, repoName, hookOptions)
if resp == nil {
dWriter.Close()
_ = dWriter.Close()
hookPrintResults(results)
fail("Internal Server Error", err)
}
Expand All @@ -373,7 +373,7 @@ Gitea or set your environment appropriately.`, "")
}
fmt.Fprintf(out, "Processed %d references in total\n", total)

dWriter.Close()
_ = dWriter.Close()
hookPrintResults(results)
return nil
}
Expand All @@ -386,7 +386,7 @@ Gitea or set your environment appropriately.`, "")

resp, err := private.HookPostReceive(repoUser, repoName, hookOptions)
if resp == nil {
dWriter.Close()
_ = dWriter.Close()
hookPrintResults(results)
fail("Internal Server Error", err)
}
Expand All @@ -402,7 +402,7 @@ Gitea or set your environment appropriately.`, "")
fail("Internal Server Error", "SetDefaultBranch failed with Error: %v", err)
}
}
dWriter.Close()
_ = dWriter.Close()
hookPrintResults(results)

return nil
Expand Down