Scope skills and memory to request profile
This commit is contained in:
@@ -14,14 +14,8 @@ export function withDefaultAssignee<T extends KanbanAssigneeSummary>(
|
||||
byAssignee: Record<string, number> = {},
|
||||
): KanbanAssigneeSummary[] {
|
||||
const defaultCount = byAssignee[DEFAULT_KANBAN_ASSIGNEE] || 0
|
||||
const hasDefault = assignees.some(assignee => assignee.name === DEFAULT_KANBAN_ASSIGNEE)
|
||||
const normalized = assignees.map(assignee => {
|
||||
return assignees.map(assignee => {
|
||||
if (assignee.name !== DEFAULT_KANBAN_ASSIGNEE || assignee.counts) return assignee
|
||||
return { ...assignee, counts: { total: defaultCount } }
|
||||
})
|
||||
if (hasDefault) return normalized
|
||||
return [
|
||||
{ name: DEFAULT_KANBAN_ASSIGNEE, counts: { total: defaultCount } },
|
||||
...normalized,
|
||||
]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user