MCPcopy Create free account
hub / github.com/github/gh-aw / replaceTemporaryProjectReferences

Function replaceTemporaryProjectReferences

actions/setup/js/temporary_id.cjs:615–624  ·  view source on GitHub ↗

* 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)

Source from the content-addressed store, hash-verified

613 * @returns {string} Text with temporary project IDs replaced with project URLs
614 */
615function 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

Callers 2

executeIssueUpdateFunction · 0.85

Calls 2

normalizeTemporaryIdFunction · 0.85
getMethod · 0.80

Tested by

no test coverage detected