* Resolves a stable board name + id for an item, preferring the nested `board` * field and falling back to the board the item was listed under.
(
item: MondayItem,
fallback?: { id: string; name: string | null }
)
| 197 | * field and falling back to the board the item was listed under. |
| 198 | */ |
| 199 | function resolveBoard( |
| 200 | item: MondayItem, |
| 201 | fallback?: { id: string; name: string | null } |
| 202 | ): { id: string; name: string } { |
| 203 | const id = item.board?.id ?? fallback?.id ?? '' |
| 204 | const name = item.board?.name ?? fallback?.name ?? '' |
| 205 | return { id, name } |
| 206 | } |
| 207 | |
| 208 | function buildSourceUrl(item: MondayItem): string | undefined { |
| 209 | return item.url ?? undefined |