Repository navigation
Add a read-only GitHub preview to project pages - #46
Merged
Merged
Conversation
A project page now shows, for each repo with a GitHub remote, the open pull requests, open issues and latest commits on the default branch, so progress across several repos can be seen in one place. The preview is kept apart from gitlib's own issues so the two cannot be confused: it is a separate "On GitHub" section, rows are named owner/repo#N and link out to GitHub, and nothing in it can be edited or assigned. It only issues GET requests, never touches planning.db, and keeps its data in a five-minute in-memory cache (Refresh bypasses it). Repos with no GitHub remote or that GitHub cannot show are reported individually. The repo-level Pull requests and Issues tabs now share the same fetch code. Local issue labels on the Projects pages say "gitlib issues". Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Projects could already hold several repos, but a project page only showed gitlib's own planning issues. This adds an On GitHub section to each project page that previews, for every repo with a GitHub remote:
It starts with a one-line summary across the project (total open PRs and issues), and each repo expands to its lists.
Keeping gitlib data and GitHub data apart
GitHub is a preview here, not a source of truth:
owner/repo#12and link out to GitHub, so they can't be mistaken for a gitlibrepo#3. There is nothing to edit, assign or file on them.Things to know when reviewing
GITHUB_TOKENis optional. Without it, GitHub allows 60 requests an hour and each repo costs three, so large projects can hit the limit; the page says so. Lookups run four repos at a time and repos sharing a remote are fetched once.getPullRequestsandgetIssues(the repo page tabs) now call shared fetchers ingithub-lists.server.ts. Their output is unchanged.Testing
npm run typecheckandnpm testpass (563 tests), including nine new tests inapps/web/test/project-github.test.ts. They cover the shape of the data, GET-only requests, planning data being left untouched, repos with no remote or unknown, partial failures, empty repos, caching and refresh, failed lookups not being cached, and shared remotes.🤖 Generated with Claude Code