Skip to content

feature request: scorecard result viewer should support a repo name option #415

@spencerschrock

Description

@spencerschrock

So right now the viewer is opened with a link like this:
https://securityscorecards.dev/viewer/?platform=github.com&org=ossf&repo=scorecard

But it may nice to support something like one of these

The first option is something that would be done in our router config, but I wasn't able to get this working:

router: {
    extendRoutes(routes, resolve) {
      routes.push({
        path: '/viewer/:platform/:org/:repo',
        redirect: to => {
          return { 
            path: '/viewer/', 
            query: { 
              platform: to.params.platform,
              org: to.params.org,
              repo: to.params.repo
            } 
          }
        },
      },)
    }
  }

The second option could be done by modifying the static JS to include something like this somewhere:

[platform, org, repo] = params.uri.split('/')

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions