feat(np): Adds renderer for MSTeams issue alerts#112890
feat(np): Adds renderer for MSTeams issue alerts#112890GabeVillalobos wants to merge 1 commit intomasterfrom
Conversation
Backend Test FailuresFailures on
|
| return None | ||
|
|
||
| @classmethod | ||
| def build_actions(cls, *, group: Group, issue_url: str) -> list[Action]: |
There was a problem hiding this comment.
should we remove the group here since it's not being used anymore?
|
|
||
| @classmethod | ||
| def build_actions(cls, *, group: Group, issue_url: str) -> list[Action]: | ||
| return [OpenUrlAction(type=ActionType.OPEN_URL, title="View Issue", url=issue_url)] |
There was a problem hiding this comment.
It might be nice to take the title as a param here; so it's a little easier to modify in the future.
| ] | ||
|
|
||
| @classmethod | ||
| def get_renderer( |
There was a problem hiding this comment.
🤔 any thoughts on this being a top level registry? i'm thinking something like: renderer = notification_renderer_registry(Provider.MS_TEAMS, Category.ISSUE)
There was a problem hiding this comment.
Not opposed to it at all. I'll sync with the team on why we went with this approach to begin with vs rolling another registry.
| class IssueMSTeamsRenderer(NotificationRenderer[MSTeamsRenderable]): | ||
| provider_key = NotificationProviderKey.MSTEAMS | ||
|
|
||
| @classmethod |
There was a problem hiding this comment.
curious about the class methods on these vs having them be instance methods? is the design pattern here meant to be more generic and allow us to return classes from helper methods and invoke easily? (that's what the get_renderer method seems like at least)
There was a problem hiding this comment.
I'm not sure what the historical reason for it is, though I do like that it keeps the render classes fully stateless by design.
9380f1c to
38b1e86
Compare
Backend Test FailuresFailures on
|
Legal Boilerplate
Look, I get it. The entity doing business as "Sentry" was incorporated in the State of Delaware in 2015 as Functional Software, Inc. and is gonna need some rights from me in order to utilize my contributions in this here PR. So here's the deal: I retain all rights, title and interest in and to my contributions, and by keeping this boilerplate intact I confirm that Sentry can use, modify, copy, and redistribute my contributions, under Sentry's choice of terms.