Remove "XXX disabled" logs

This commit is contained in:
Mathieu Velten 2020-09-09 14:49:45 +02:00
parent ba72ef4ef1
commit 20cfb8a28c

View file

@ -479,9 +479,6 @@ func (s *submitServer) saveReport(ctx context.Context, p parsedPayload, reportDi
} }
func (s *submitServer) submitGithubIssue(ctx context.Context, p parsedPayload, listingURL string, resp *submitResponse) error { func (s *submitServer) submitGithubIssue(ctx context.Context, p parsedPayload, listingURL string, resp *submitResponse) error {
if s.ghClient == nil {
log.Println("GH issue submission disabled")
} else {
// submit a github issue // submit a github issue
ghProj := s.cfg.GithubProjectMappings[p.AppName] ghProj := s.cfg.GithubProjectMappings[p.AppName]
if ghProj == "" { if ghProj == "" {
@ -504,14 +501,11 @@ func (s *submitServer) submitGithubIssue(ctx context.Context, p parsedPayload, l
log.Println("Created issue:", *issue.HTMLURL) log.Println("Created issue:", *issue.HTMLURL)
resp.ReportURL = *issue.HTMLURL resp.ReportURL = *issue.HTMLURL
}
return nil return nil
} }
func (s *submitServer) submitSlackNotification(p parsedPayload, listingURL string) error { func (s *submitServer) submitSlackNotification(p parsedPayload, listingURL string) error {
if s.slack == nil {
log.Println("Slack notifications disabled")
} else {
slackBuf := fmt.Sprintf( slackBuf := fmt.Sprintf(
"%s\nApplication: %s\nReport: %s", "%s\nApplication: %s\nReport: %s",
p.UserText, p.AppName, listingURL, p.UserText, p.AppName, listingURL,
@ -521,7 +515,7 @@ func (s *submitServer) submitSlackNotification(p parsedPayload, listingURL strin
if err != nil { if err != nil {
return err return err
} }
}
return nil return nil
} }
@ -587,9 +581,6 @@ func buildGithubIssueRequest(p parsedPayload, listingURL string) github.IssueReq
} }
func (s *submitServer) sendEmail(p parsedPayload, reportDir string) error { func (s *submitServer) sendEmail(p parsedPayload, reportDir string) error {
if s.cfg.SMTPServer == "" {
log.Println("Email submission disabled")
} else {
e := email.NewEmail() e := email.NewEmail()
e.From = "Rageshake <rageshake@matrix.org>" e.From = "Rageshake <rageshake@matrix.org>"
@ -617,7 +608,7 @@ func (s *submitServer) sendEmail(p parsedPayload, reportDir string) error {
if err != nil { if err != nil {
return err return err
} }
}
return nil return nil
} }