- 
                Notifications
    You must be signed in to change notification settings 
- Fork 17
Make slack work as discord #1067
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
base: main
Are you sure you want to change the base?
Conversation
54bb09e    to
    136580f      
    Compare
  
    136580f    to
    11331c6      
    Compare
  
    | SlackChannelID string | ||
| SlackDebug bool | ||
|  | ||
| BaseClient *http.Client | 
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
since we are using this http client over here, we should use a round tripper to test that the request is formed as expected and we can handle the response and the various errors generated by the slack API
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
but, that's why we use the library, are we testing that the library performs as expected?
| RunName string | ||
| } | ||
|  | ||
| func (r slackReporter) getThreadHeading(numFindings int) (string, error) { | 
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
since we have the ThreadData struct why not have a String method on it that invokes the template and passes itself to it? also, do we need a whole separate file embedded into the code for a one liner? we could have it as a string in this file
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I prefer templates if i'm super honest, it is super straightforward to write and see what's going on when you have Markdown in a file instead of some arbitrary string in the code. Personal preference ofc
2d3ce50    to
    5deb93f      
    Compare
  
    …lates exactly like the Discord component would. -- Dependencies
5deb93f    to
    da99246      
    Compare
  
    

Make slack create a thread per scan and messages on the thread for every finding found