-
Notifications
You must be signed in to change notification settings - Fork 32
Open
Labels
enhancementNew feature or requestNew feature or request
Description
Describe how the feature might make your life easier or solve a problem
I want to be alerted when my name is mentioned in a comment, internal policy, procedure, risk, or task so I know about it.
Describe the solution you'd like to see with any relevant context
We want to parse the next of the corresponding text field for data that looks like:
<div data-slate-node=\"element\" data-slate-inline=\"true\" data-slate-void=\"true\" data-slate-key=\"01KBR2E182QTFQ27TS4B87G2MB\" data-slate-type=\"mention\" data-slate-value=\"Sarah Funkhouser\" data-slate-id=\"s-DpyYQ0Xk\" class=\"slate-mention inline-block rounded-md bg-muted px-1.5 py-0.5 align-baseline text-sm font-medium\" style=\"position:relative\">
data-slate-key -> user.ID
data-slate-value -> user.DisplayName
We only want to do this if that was added; I think you should be able to use the data-slate-id= and compare the old vs. new value for the field and see if it was there before and only add a notification when that id is new but we should test this.
Fields we want to look at:
comment.text
internalPolicy.Details
procedure.Details
risk.Details
task.Details
Notes:
- Make a package for slate parsing and put it in
pkg, its possible we might want to use this for other things - make a function to
checkForMentions-> this should return amap[string]Mention{}where the key is thedata-slate-idandMentioncontains: userID, userDisplayName,objectType,objectID,objectName - make a function to
checkForNewMentionsthat takes old text, new text, and list of slate ids -> returns only new ids - define the fields we are checking for in slack as const to make it easier to expand later + keep up with any breaking changes
- We can then use this to parse events from these object types -> create notifications
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request