diff --git a/go.mod b/go.mod index 0e007e8..c7dbc91 100644 --- a/go.mod +++ b/go.mod @@ -1,5 +1,7 @@ module github.com/matrix-org/rageshake +go 1.14 + require ( cloud.google.com/go v0.0.0-20170406015231-675fad27ef35 github.com/golang/protobuf v0.0.0-20170331031902-2bba0603135d diff --git a/submit.go b/submit.go index 049d199..1a2721a 100644 --- a/submit.go +++ b/submit.go @@ -479,6 +479,10 @@ func (s *submitServer) saveReport(ctx context.Context, p parsedPayload, reportDi } func (s *submitServer) submitGithubIssue(ctx context.Context, p parsedPayload, listingURL string, resp *submitResponse) error { + if s.ghClient == nil { + return nil + } + // submit a github issue ghProj := s.cfg.GithubProjectMappings[p.AppName] if ghProj == "" { @@ -506,6 +510,10 @@ func (s *submitServer) submitGithubIssue(ctx context.Context, p parsedPayload, l } func (s *submitServer) submitSlackNotification(p parsedPayload, listingURL string) error { + if s.slack == nil { + return nil + } + slackBuf := fmt.Sprintf( "%s\nApplication: %s\nReport: %s", p.UserText, p.AppName, listingURL,