Skip to content

Commit

Permalink
fix(viewer): slice the params.uri string in a way to allow for multi-…
Browse files Browse the repository at this point in the history
…level groups

this is required to display results for repositories in multi-level groups, which is a feature in gitlab

Signed-off-by: Stefan Hynek <[email protected]>
  • Loading branch information
stexandev authored Nov 6, 2024
1 parent 5f94e70 commit c7106c9
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion scorecards-site/static/viewer/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -1155,7 +1155,10 @@
let platform, org, repo, apiURL;

if (params.uri) {
[platform, org, repo] = params.uri.split('/');
const parts = params.uri.split('/');
platform = parts[0];
org = parts.slice(1, -1).join('/');
repo = parts[parts.length - 1];
} else {
platform = params.platform;
org = params.org;
Expand Down

0 comments on commit c7106c9

Please sign in to comment.