-
-
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: add more events in integrations #4815
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
5527a58
to
5182598
Compare
7b4c095
to
4b5cf11
Compare
value: event, | ||
label: event, | ||
})) | ||
.sort((a, b) => a.label.localeCompare(b.label)); |
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.
We now have a bunch of events, so it's better if we sort them. Ideally they would be grouped, but maybe that can come in a later PR.
return type; | ||
} | ||
} | ||
Mustache.escape = (text) => text; |
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.
Globally disables Mustache escaping so we don't need to specify link variables with {{{link}}}
, which would be unintuitive.
9b00911
to
3f1b90c
Compare
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.
Wow. That's a lot of extra events to support!
Nice!
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.
LGTM!
@@ -171,7 +171,7 @@ export class SegmentService implements ISegmentService { | |||
await this.eventService.storeEvent({ | |||
type: SEGMENT_DELETED, | |||
createdBy: user.email || user.username, | |||
data: segment, | |||
preData: segment, |
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.
Nice discovery!
https://linear.app/unleash/issue/2-1253/add-support-for-more-events-in-the-slack-app-integration
Adds support for a lot more events in our integrations. Here is how the full list looks like:
I added the events that I thought were relevant based on my own discretion. Know of any event we should add? Let me know and I'll add it 🙂
For now I only added these events to the new Slack App integration, but we can add them to the other integrations as well since they are now supported.
The event formatter was refactored and changed quite a bit in order to make it easier to maintain and add new events in the future. As a result, events are now posted with different text. Do we consider this a breaking change? If so, I can keep the old event formatter around, create a new one and only use it for the new Slack App integration.
I noticed we don't have good 404 behaviors in the UI for things that are deleted in the meantime, that's why I avoided some links to specific resources (like feature strategies, integration configurations, etc), but we could add them later if we improve this.
This PR also tries to add some consistency to the the way we log events.