added adrFileLocationUrl for adr file read

Signed-off-by: Deepankumar Loganathan <deepan0433@gmail.com>
This commit is contained in:
Deepankumar Loganathan
2024-02-21 19:46:23 +01:00
parent 2e925ed076
commit 329e210003
2 changed files with 8 additions and 8 deletions
+4 -5
View File
@@ -63,15 +63,14 @@ export const getAdrLocationUrl = (
throw new Error(`Missing ADR annotation: ${ANNOTATION_ADR_LOCATION}`);
}
let url = getAdrLocationDir(entity)!.replace(/\/$/, '');
if (adrFilePath) {
return scmIntegration.resolveUrl({
url: `${getAdrLocationDir(entity)!.replace(/\/$/, '')}/${adrFilePath}`,
base: getEntitySourceLocation(entity).target,
});
url = `${url}/${adrFilePath}`;
}
return scmIntegration.resolveUrl({
url: getAdrLocationDir(entity)!,
url,
base: getEntitySourceLocation(entity).target,
});
};