Skip to content

Make slack work as discord - #1067

Open
northdpole wants to merge 3 commits into
mainfrom
make-slack-work-as-discord
Open

Make slack work as discord#1067
northdpole wants to merge 3 commits into
mainfrom
make-slack-work-as-discord

Conversation

@northdpole

Copy link
Copy Markdown
Contributor

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

@northdpole
northdpole force-pushed the make-slack-work-as-discord branch from 54bb09e to 136580f Compare August 18, 2025 21:33
@northdpole
northdpole force-pushed the make-slack-work-as-discord branch from 136580f to 11331c6 Compare August 26, 2025 18:05
Comment thread components/reporters/slack/internal/reporter/slack/client.go Outdated
Comment thread components/reporters/slack/internal/reporter/slack/client.go Outdated
Comment thread components/reporters/slack/internal/reporter/slack/client.go Outdated
Comment thread components/reporters/slack/internal/reporter/slack/client.go
Comment thread components/reporters/slack/internal/reporter/slack/client.go Outdated
SlackChannelID string
SlackDebug bool

BaseClient *http.Client

Copy link
Copy Markdown
Contributor

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

Copy link
Copy Markdown
Contributor Author

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?

Comment thread components/reporters/slack/internal/reporter/slack/client.go
Comment thread components/reporters/slack/internal/reporter/issue.go
Comment thread components/reporters/slack/internal/reporter/reporter.go Outdated
RunName string
}

func (r slackReporter) getThreadHeading(numFindings int) (string, error) {

Copy link
Copy Markdown
Contributor

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

@northdpole northdpole Aug 27, 2025

Copy link
Copy Markdown
Contributor Author

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

@dlicheva

dlicheva commented Aug 28, 2025

Copy link
Copy Markdown
Contributor

The link to the issues should be updated to point to the new issue URL. It should also display the URL correctly in Slack:
Screenshot from 2025-08-28 10-02-19
Screenshot from 2025-08-28 10-03-23

@northdpole
northdpole force-pushed the make-slack-work-as-discord branch 2 times, most recently from 2d3ce50 to 5deb93f Compare August 28, 2025 16:31
@northdpole
northdpole force-pushed the make-slack-work-as-discord branch from 5deb93f to da99246 Compare August 28, 2025 23:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants