-
-
Notifications
You must be signed in to change notification settings - Fork 658
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
feat: slack app addon default channels #4308
Conversation
Sonatype Lift is retiringSonatype Lift will be retiring on Sep 12, 2023, with its analysis stopping on Aug 12, 2023. We understand that this news may come as a disappointment, and Sonatype is committed to helping you transition off it seamlessly. If you’d like to retain your data, please export your issues from the web console. |
The latest updates on your projects. Learn more about Vercel for Git ↗︎
1 Ignored Deployment
|
@@ -52,17 +53,20 @@ export default class SlackAppAddon extends Addon { | |||
parameters: ISlackAppAddonParameters, | |||
): Promise<void> { | |||
try { | |||
const { accessToken } = parameters; | |||
const { accessToken, defaultChannels } = parameters; |
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'm wondering if we should opt-in on the events we send to the default channels, I don't think all events are relevant for Slack and it can potentially affect our rate limiting. I know default channels are optional, but I'm just wondering if it's a good thing to do.
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.
Ok, the events received by handlEvent are already filtered here:
unleash/src/lib/services/addon-service.ts
Line 114 in 34c4dd5
.filter((addon) => addon.events.includes(eventName)) |
@@ -52,17 +53,20 @@ export default class SlackAppAddon extends Addon { | |||
parameters: ISlackAppAddonParameters, | |||
): Promise<void> { | |||
try { | |||
const { accessToken } = parameters; | |||
const { accessToken, defaultChannels } = parameters; |
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.
Ok, the events received by handlEvent are already filtered here:
unleash/src/lib/services/addon-service.ts
Line 114 in 34c4dd5
.filter((addon) => addon.events.includes(eventName)) |
Co-authored-by: Gastón Fournier <gaston@getunleash.io>
https://linear.app/unleash/issue/2-1249/add-support-for-default-slack-channels
Adds support for default Slack channels (multiple, comma-separated).
Some of the events we are handling do not have associated tags, or maybe the tags are empty. This adds a "default Slack channels" parameter to the addon configuration in order to post messages to those channels in those cases.