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

Open source interactive visualizer #20

Closed
CryogenicPlanet opened this issue Aug 7, 2021 · 3 comments
Closed

Open source interactive visualizer #20

CryogenicPlanet opened this issue Aug 7, 2021 · 3 comments

Comments

@CryogenicPlanet
Copy link

Hey it would be great if you could open source the interactive visualizer https://octo-repo-visualization.vercel.app/?repo=paperjs%2Fpaper.js

If that is not possible, at least adding support for private repos with Access tokens would be nice

Another idea here is this repo could deploy an interactive version of the visualizer on gh pages so we can get that on each PR rather than the static svg

@Wattenberger
Copy link
Contributor

It's not currently documented, but the interactive visualizer does accept tokens. If you add a token key into Local Storage with a PAT with "repo" access, it will use that token for the GitHub API calls.

image

@filipegiusti
Copy link

THIS PROJECT IS SO GREAT! Thanks @Wattenberger

I tried the token in local storage approach but couldn't get it to work. Has anything change on the interactive visualizer? I searched "token" in the minified code and couldn't find anything.

@filipegiusti
Copy link

I ended up doing the following:

  1. Go to https://github.com/settings/tokens
  2. Generate a new token with repo permissions
  3. Go to https://octo-repo-visualization.vercel.app/
  4. Add the following code to the JS console replacing the TOKEN with your token.
    window.originalFetch = window.fetch;
    const modifiedFetch = (resource, init) => window.originalFetch(resource, { ...init, headers: { "Authorization": "token TOKEN" } });
    window.fetch = modifiedFetch;
  5. In the repository input, type any private repository.

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

3 participants