Skip to content

Commit

Permalink
Allow debugging webhook request
Browse files Browse the repository at this point in the history
Do not print repo token in debug output
  • Loading branch information
gdm85 committed Oct 30, 2020
1 parent 0df65b3 commit bb441ea
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions goveralls.go
Original file line number Diff line number Diff line change
Expand Up @@ -251,6 +251,13 @@ func processParallelFinish(jobID, token string) error {
params.Set("payload[build_num]", jobID)
params.Set("payload[status]", "done")
res, err := http.PostForm(*endpoint+"/webhook", params)
if *debug {
if token != "" {
params.Set("repo_token", "*******")
}
log.Printf("Posted webhook data: %q", params.Encode())
}

if err != nil {
return err
}
Expand Down Expand Up @@ -447,6 +454,11 @@ func process() error {
}

if *debug {
j := j
if j.RepoToken != nil && *j.RepoToken != "" {
s := "*******"
j.RepoToken = &s
}
b, err := json.MarshalIndent(j, "", " ")
if err != nil {
return err
Expand Down

0 comments on commit bb441ea

Please sign in to comment.