Skip to content

Commit

Permalink
bug: fix url parsing for non git urls (oci://, no protocol etc) (#11819)
Browse files Browse the repository at this point in the history

Signed-off-by: Alex Eftimie <alex.eftimie@getyourguide.com>
  • Loading branch information
alexef authored Jan 6, 2023
1 parent c683ab9 commit 052a5d2
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion ui/src/app/shared/components/urls.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,12 @@ export function repoUrl(url: string): string {
}

export function revisionUrl(url: string, revision: string, forPath: boolean): string {
const parsed = GitUrlParse(url);
try {
const parsed = GitUrlParse(url);
} catch {
// URL Parsing failed
return null;
}
let urlSubPath = isSHA(revision) ? 'commit' : 'tree';

if (url.indexOf('bitbucket') >= 0) {
Expand Down

0 comments on commit 052a5d2

Please sign in to comment.