resolveItemNumber returns the object number, trying item.Number first then URL parsing.
(item CreatedItemReport)
| 365 | |
| 366 | // resolveItemNumber returns the object number, trying item.Number first then URL parsing. |
| 367 | func resolveItemNumber(item CreatedItemReport) int { |
| 368 | if item.Number > 0 { |
| 369 | return item.Number |
| 370 | } |
| 371 | if item.URL != "" { |
| 372 | return parseNumberFromURL(item.URL) |
| 373 | } |
| 374 | return 0 |
| 375 | } |
| 376 | |
| 377 | // enrichOutcomeWithObjectiveValue computes the objective value for an outcome by fetching |
| 378 | // its associated issue/PR labels and applying the label-to-value mapping. |