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

Interactive Repo Visualizer and private repos #52

Open
lmakarov opened this issue Nov 9, 2022 · 1 comment
Open

Interactive Repo Visualizer and private repos #52

lmakarov opened this issue Nov 9, 2022 · 1 comment

Comments

@lmakarov
Copy link

lmakarov commented Nov 9, 2022

This is a follow up to #20.

The Interactive Repo Visualizer tool is superior to the static SVG generation option.

It will be great to have it either open-sourced, released as part of the repo Insights (tab) on GitHub, or at least add official support for accessing private repos.


In the mean time, here are the instructions to get the current tool working with private repos:

  1. Go to https://github.com/settings/tokens

  2. Generate a new PAT with repo permissions

  3. Go to https://mango-dune-07a8b7110.1.azurestaticapps.net/

  4. Add the following code to the JS console replacing TOKEN with your GitHub PAT

    window.originalFetch = window.fetch;
    const modifiedFetch = (resource, init) => window.originalFetch(resource, { ...init, headers: { "Authorization": "Bearer 
    TOKEN" } });
    window.fetch = modifiedFetch;
  5. In the repository input, type any repository (public or private)

Kudos to @filipegiusti for posting the original instructions for private repo support.

@odigity
Copy link

odigity commented Feb 1, 2023

I didn't realize it doesn't work with private repos. I spent half an hour trying to figure out why the job would suddenly stop showing up in the PR status just from adding uses: githubocto/repo-visualizer. I wish GitHub would have given me some kind of error instead of just having the job not appear as if it doesn't exist.

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