@@ -391,10 +391,12 @@ async function TryGetHTMLLinkNameAndUrlForArtifactLink(currentProjectName, artif
391
391
}
392
392
393
393
// TODO:
394
- // - Resolve project and repository ids for better display? I.e. in the history, show the project and repository names?
394
+ // - Retrieve information from the linked artifacts?
395
+ // - Project and repository names for better display? I.e. in the history, show the project and repository names?
396
+ // - Build information (succeeded, failed, deleted)?
397
+ // - Show small icons, as in the default ADO history?
395
398
// - Support all other artifact link types.
396
399
// - Maybe call routeUrl() at the start of the initialization to trigger the REST request as early as possible?
397
- // - TFS code references? (Compare e.g. constructLinkToContentFromRouteId())
398
400
// - Check all places whether EscapeHtml() or encode...() is missing.
399
401
// - Split into multiple functions, or a map or so.
400
402
// - Wrap in try...catch?
@@ -594,6 +596,31 @@ async function TryGetHTMLLinkNameAndUrlForArtifactLink(currentProjectName, artif
594
596
return [ filepath , url , readableChangeset ] ;
595
597
}
596
598
}
599
+ else if ( artifactTool === 'Build' ) {
600
+ // Used for 'Build', 'Found in build' and 'Integrated in build' links.
601
+ // Example: vstfs:///Build/Build/5
602
+ if ( artifactType === 'Build' ) {
603
+ const buildId = artifactId ;
604
+
605
+ /*
606
+ "routeTemplates": [
607
+ "{project}/{team}/_build/results",
608
+ "{project}/_build/results"
609
+ ],
610
+ */
611
+ const url = await gLocationService . routeUrl (
612
+ 'ms.vss-build-web.ci-results-hub-route' ,
613
+ {
614
+ // TODO: The build can be in a different project. Using the current project in this case results
615
+ // in a URL pointing to a non-existent build. The buildId is unique over all projects. So we would
616
+ // need to query the project of the build.
617
+ project : currentProjectName ,
618
+ buildId : buildId
619
+ } ) ;
620
+
621
+ return [ buildId , url , '' ] ;
622
+ }
623
+ }
597
624
598
625
// Unknown artifact link.
599
626
return undefined ;
0 commit comments