* Replace temporary project ID references in text with actual project URLs * Format: #aw_XXXX (or #aw_XXXXXXXX) -> https://github.com/orgs/myorg/projects/123 * @param {string} text - The text to process * @param {Map } tempProjectMap - Map of temporary_project_id to project URL *
(text, tempProjectMap)
| 613 | * @returns {string} Text with temporary project IDs replaced with project URLs |
| 614 | */ |
| 615 | function replaceTemporaryProjectReferences(text, tempProjectMap) { |
| 616 | return text.replace(TEMPORARY_ID_PATTERN, (match, tempId) => { |
| 617 | const resolved = tempProjectMap.get(normalizeTemporaryId(tempId)); |
| 618 | if (resolved !== undefined) { |
| 619 | return resolved; |
| 620 | } |
| 621 | // Return original if not found (it may be an issue ID) |
| 622 | return match; |
| 623 | }); |
| 624 | } |
| 625 | |
| 626 | /** |
| 627 | * Extract all temporary ID references from a message |
no test coverage detected