Skip to content

Commit

Permalink
feat: optimize log
Browse files Browse the repository at this point in the history
  • Loading branch information
yuluo-yx authored Apr 26, 2024
2 parents 3602cc9 + ff4119b commit 01bccf4
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions retest/retest.go
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,10 @@ func getPRCommentContent(rt *Runtime) bool {
return false
}

fmt.Printf("comment content: %v\n", comment.GetBody())
if rt.Debug {
log.Printf("comment: %v\n", comment.GetBody())
}

if comment.GetBody() == Retest {

return true
Expand Down Expand Up @@ -175,7 +178,9 @@ func rerunJobs(rt *Runtime, failedJobs []*GHRetest) (result *GHRetestResult) {

for _, job := range failedJobs {

fmt.Printf("retesting check: %v\n %v\n", job.Name, job.Url)
if rt.Debug {
log.Printf("retesting check: %v\n %v\n", job.Name, job.Url)
}

u := fmt.Sprintf("repos/%v/%v/actions/jobs/%v/rerun", rt.Owner, rt.Repo, getSuffix(job.Url))
req, err := githubClient.NewRequest(http.MethodPost, u, nil)
Expand Down

0 comments on commit 01bccf4

Please sign in to comment.