Proposal: inline "Private repository" option on the home form
Author: sudoping01Created Sep 21, 2026Updated Sep 21, 2026
Current flow
- Paste a private repo URL on the home page and click Diagram
- You land on the repo page, which shows an access error with two buttons: Add GitHub access and Open repository on GitHub
- Add GitHub access opens the token dialog; after saving, generation starts
It works, but the user only learns a token is needed after hitting an error page. Nothing on the home form says private repos are supported or that a token is required.
Proposal
Let users provide the token up front on the home form, similar to how Gitingest (https://gitingest.com) does it:
- A "Private repository" checkbox under the repository URL input
- When checked, it reveals a token field, plus the existing "Create token on GitHub" link (fine-grained token with Contents: Read-only already selected) and the same data-usage note the dialog shows today
- On submit, the token is saved with the existing saveCredential("github_pat", token) (same protected cookie), then the form navigates to /owner/repo as it does now, so generation starts directly instead of stopping on the error page
Scope
- Front end only. Token storage, per-request credentials, the private cache namespace and generation stay unchanged.
- The current error page with Add GitHub access stays as the fallback for people who open a private repo link directly (shared links, bookmarks) or forget to tick the box.
Happy to implement this if the direction sounds good.
Source: ahmedkhaleel2004/gitdiagram