Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
spencerschrock opened this issue Jun 9, 2023 · 2 comments
Assignees

Comments

@spencerschrock
Copy link
Contributor

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('/')
@cynthia-sg
Copy link
Contributor

https://securityscorecards.dev/viewer/?uri=github.com/ossf/scorecard

I'd be happy to take care of this one if you'd like 🙂

@spencerschrock
Copy link
Contributor Author

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants