Skip to content

feat(cli): support GitHub registries#2726

Draft
maxffarrell wants to merge 83 commits into
huntabyte:mainfrom
maxffarrell:codex/github-registries-pr
Draft

feat(cli): support GitHub registries#2726
maxffarrell wants to merge 83 commits into
huntabyte:mainfrom
maxffarrell:codex/github-registries-pr

Conversation

@maxffarrell

@maxffarrell maxffarrell commented Jun 2, 2026

Copy link
Copy Markdown
Contributor

Closes #2725.
Depends on #2722.

Summary

  • add GitHub registry address/ref parsing and raw source loading for owner/repo/item installs
  • support source registry include resolution and file content loading for Svelte install payloads
  • add registry validate support for GitHub sources\n- document GitHub registries in the Registry docs nav
  • add the June 2026 GitHub Registries changelog entry ported from shadcn/ui

@changeset-bot

changeset-bot Bot commented Jun 2, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 749164b

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@github-actions

github-actions Bot commented Jun 2, 2026

Copy link
Copy Markdown
Contributor
built with Refined Cloudflare Pages Action

⚡ Cloudflare Pages Deployment

Name Status Preview Last Commit
shadcn-svelte ✅ Ready (View Log) Visit Preview 749164b

@maxffarrell maxffarrell force-pushed the codex/github-registries-pr branch from a7d338e to 7968449 Compare June 2, 2026 03:06
@maxffarrell maxffarrell marked this pull request as ready for review June 5, 2026 03:27
Copilot AI review requested due to automatic review settings June 5, 2026 03:27
@maxffarrell maxffarrell marked this pull request as draft June 5, 2026 03:27

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Note

Copilot was unable to run its full agentic suite in this review.

Adds support for using public GitHub repositories as “source registries” in the CLI, plus accompanying docs and changelog/RSS updates in the docs app.

Changes:

  • Implement GitHub address parsing, git ref (branch/tag/SHA) resolution, and source-registry loading with include support.
  • Integrate GitHub item resolution into the existing registry dependency resolver and add a registry validate CLI command.
  • Add docs pages + changelog collection and an RSS feed endpoint for changelog updates.

Reviewed changes

Copilot reviewed 30 out of 36 changed files in this pull request and generated no comments.

Show a summary per file
File Description
packages/cli/test/utils/registry-github.test.ts Adds Vitest coverage for GitHub address parsing and GitHub source-registry item resolution.
packages/cli/src/utils/registry/source.ts Implements “source registry” loading with include, path rewriting, and validations.
packages/cli/src/utils/registry/index.ts Resolves GitHub item addresses during registry dependency resolution; adds GitHub catalog→index helper.
packages/cli/src/utils/registry/github.ts Adds GitHub raw-content reader + caching and fetch helpers for catalog/item loading.
packages/cli/src/utils/registry/github-ref.ts Resolves GitHub refs to SHAs via git ls-remote.
packages/cli/src/utils/registry/address.ts Parses/validates GitHub registry sources and item addresses.
packages/cli/src/commands/registry/validate.ts Adds registry validate owner/repo[#ref] command for GitHub registries.
packages/cli/src/commands/registry/index.ts Registers the new registry validate subcommand.
docs/velite.config.js Adds changelog collection and supports optional date frontmatter.
docs/src/routes/rss.xml/+server.ts Adds a prerendered RSS feed from changelog content.
docs/src/routes/(app)/+layout.server.ts Uses safer user-config parsing for cookie content.
docs/src/routes/(app)/(layout)/docs/changelog/+page.ts Adds changelog index page load logic (latest vs older).
docs/src/routes/(app)/(layout)/docs/changelog/+page.svelte Adds changelog UI with RSS link.
docs/src/routes/(app)/(layout)/+page.svelte Updates landing page hero + swaps in new cards demo and imagery.
docs/src/routes/(app)/(layout)/(root)/cards/ui-elements.svelte Adds demo “UI elements” card for landing page.
docs/src/routes/(app)/(layout)/(root)/cards/transfer-funds.svelte Adds demo “Transfer funds” card for landing page.
docs/src/routes/(app)/(layout)/(root)/cards/skeleton/ui-elements.svelte Adds skeleton version of UI elements card.
docs/src/routes/(app)/(layout)/(root)/cards/skeleton/transfer-funds.svelte Adds skeleton version of transfer funds card.
docs/src/routes/(app)/(layout)/(root)/cards/skeleton/savings-targets.svelte Adds skeleton for savings targets card.
docs/src/routes/(app)/(layout)/(root)/cards/skeleton/qr-connect.svelte Adds skeleton for QR connect card.
docs/src/routes/(app)/(layout)/(root)/cards/skeleton/power-usage.svelte Adds skeleton for power usage card.
docs/src/routes/(app)/(layout)/(root)/cards/skeleton/payout-threshold.svelte Adds skeleton for payout threshold card.
docs/src/routes/(app)/(layout)/(root)/cards/skeleton/payments.svelte Adds skeleton for payments card.
docs/src/routes/(app)/(layout)/(root)/cards/skeleton/notification-settings.svelte Adds skeleton for notification settings card.
docs/src/routes/(app)/(layout)/(root)/cards/skeleton/new-milestone.svelte Adds skeleton for new milestone card.
docs/src/routes/(app)/(layout)/(root)/cards/skeleton/empty-distribute-track.svelte Adds skeleton for empty state card.
docs/src/routes/(app)/(layout)/(root)/cards/skeleton/dividend-income.svelte Adds skeleton for dividend income card.
docs/src/routes/(app)/(layout)/(root)/cards/skeleton/contribution-history.svelte Adds skeleton for contribution history card.
docs/src/routes/(app)/(layout)/(root)/cards/skeleton/claimable-balance.svelte Adds skeleton for claimable balance card.
docs/src/routes/(app)/(layout)/(root)/cards/skeleton/analytics-card.svelte Adds skeleton for analytics card.
docs/src/routes/(app)/(layout)/(root)/cards/skeleton/account-access.svelte Adds skeleton for account access card.
docs/src/routes/(app)/(layout)/(root)/cards/sidebar-section.svelte Adds shared sidebar section wrapper for demo cards.
docs/src/routes/(app)/(layout)/(root)/cards/sidebar-nav.svelte Adds demo sidebar navigation card.
docs/src/routes/(app)/(layout)/(root)/cards/savings-targets.svelte Adds demo savings targets card.
docs/src/routes/(app)/(layout)/(root)/cards/qr-connect.svelte Adds demo QR connect card.
docs/src/routes/(app)/(layout)/(root)/cards/power-usage.svelte Adds demo power usage card.
docs/src/routes/(app)/(layout)/(root)/cards/payout-threshold.svelte Adds demo payout threshold card.
docs/src/routes/(app)/(layout)/(root)/cards/payments.svelte Adds demo payments card.
docs/src/routes/(app)/(layout)/(root)/cards/notification-settings.svelte Adds demo notification settings card.
docs/src/routes/(app)/(layout)/(root)/cards/new-milestone.svelte Adds demo new milestone card.
docs/src/routes/(app)/(layout)/(root)/cards/empty-distribute-track.svelte Adds demo empty state card.
docs/src/routes/(app)/(layout)/(root)/cards/dividend-income.svelte Adds demo dividend income card.
docs/src/routes/(app)/(layout)/(root)/cards/contribution-history.svelte Adds demo contribution history card.
docs/src/routes/(app)/(layout)/(root)/cards/claimable-balance.svelte Adds demo claimable balance card.
docs/src/routes/(app)/(layout)/(root)/cards/cards-demo.svelte Adds composed landing-page cards demo layout (with skeleton rails).
docs/src/routes/(app)/(layout)/(root)/cards/analytics-card.svelte Adds demo analytics card.
docs/src/routes/(app)/(layout)/(root)/cards/account-access.svelte Adds demo account access card.
docs/src/lib/user-config.svelte.ts Adds safe JSON parsing helpers for user config.
docs/src/lib/registry/icons/hugeicons/index.ts Updates generated HugeIcons icon-name type list.
docs/src/lib/registry/icons/hugeicons/Analytics01Icon.ts Adds generated export for a new HugeIcons icon.
docs/src/lib/navigation.ts Adds “GitHub Registries” nav item and tweaks main nav items.
docs/src/lib/docs.ts Adds changelog page loading/sorting utilities and includes changelog docs in metadata.
docs/src/lib/components/site-header.svelte Updates header layout/buttons (removes logo link and tweaks create CTA).
docs/src/lib/components/mobile-nav.svelte Removes redundant “Home” entry in mobile menu.
docs/src/lib/components/command-menu/command-menu.svelte Updates search trigger styling + breakpoint behavior.
docs/src/lib/components/announcement.svelte Updates announcement content and styling.
docs/src/app.html Adjusts header height CSS variable at lg breakpoint.
docs/content/registry/github.md Adds documentation for GitHub registries (setup, include, refs, validation).
docs/content/changelog/2026-06-github-registries.md Adds changelog entry announcing GitHub registries.
docs/content/changelog/2026-05-rhea.md Adds changelog entry for Rhea style.
docs/content/changelog/2026-04-sera.md Adds changelog entry for Sera style.
docs/content/changelog/2026-03-luma.md Adds changelog entry for Luma style.
docs/content/changelog/2025-10-new-components.md Adds changelog entry for new components.
docs/content/changelog/2025-06-calendar.md Adds changelog entry for calendar components.
docs/content/changelog/2025-05-tailwind-v4.md Adds changelog entry for Tailwind v4 support.
docs/content/changelog/2024-03-blocks.md Adds changelog entry for Blocks + other updates.
docs/content/changelog/2024-02-resizable.md Adds changelog entry for Resizable + icon import changes.
docs/content/changelog/2024-01-new-components.md Adds changelog entry for new components.
docs/content/changelog/2023-12-calendar.md Adds changelog entry for calendar components.
docs/content/changelog/2023-11-toggle-group.md Adds changelog entry for toggle group.
docs/content/changelog/2023-10-command-combobox.md Adds changelog entry for command/combobox + forms updates.
.changeset/dull-candles-walk.md Adds a changeset entry for improved error logging.
Comments suppressed due to low confidence (7)

packages/cli/src/utils/registry/github-ref.ts:1

  • resolveGitHubRef will fail for the default case where ref is omitted (i.e. HEAD). git ls-remote --symref returns ref: refs/heads/<default>\tHEAD and a SHA line for refs/heads/<default>, but parseGitLsRemote drops the ref: symref line and never maps HEAD to a SHA, while getPreferredGitHubRefNames("HEAD") only checks "HEAD". Fix by capturing the symref target for HEAD and mapping HEAD to the target SHA (or by returning a richer parse result that includes symrefs). This is critical because omitting #ref is a primary usage path.
    packages/cli/src/utils/registry/github-ref.ts:1
  • resolveGitHubRef will fail for the default case where ref is omitted (i.e. HEAD). git ls-remote --symref returns ref: refs/heads/<default>\tHEAD and a SHA line for refs/heads/<default>, but parseGitLsRemote drops the ref: symref line and never maps HEAD to a SHA, while getPreferredGitHubRefNames("HEAD") only checks "HEAD". Fix by capturing the symref target for HEAD and mapping HEAD to the target SHA (or by returning a richer parse result that includes symrefs). This is critical because omitting #ref is a primary usage path.
    packages/cli/src/utils/registry/github.ts:1
  • Failed fetches are cached permanently for the lifetime of sourceCache because the rejected promise remains in the map. This makes transient network failures “sticky” and can also prevent recovery if the repository contents change mid-process. Consider wrapping fetchGitHubSourceFile(...) with a .catch(...) that deletes the cache entry before rethrowing (similar to the pattern used in resolveGitHubRef).
    packages/cli/src/utils/registry/source.ts:1
  • This module is source-reader generic (RegistrySourceReader), but the thrown message hard-codes “GitHub registry”. This will be misleading if loadRegistryItemFromSource is reused for other source types (or even for tests). Consider making the message source-neutral (e.g. “does not exist in the registry source”) or allowing the caller to provide a context label.
    packages/cli/src/commands/registry/validate.ts:1
  • fetchGitHubRegistryItem will resolve the ref (via git ls-remote) per item because each call uses its own default sourceCache. For repos with many items, validation can become unnecessarily slow and noisy. Use a shared sourceCache map for the whole validation run and pass it into both fetchGitHubRegistryCatalog and fetchGitHubRegistryItem calls to reuse the resolved SHA and any fetched source files.
    packages/cli/src/utils/registry/address.ts:1
  • As implemented, strings like owner/repo/something.json will be treated as a GitHub item address (because they’re not URLs and have ≥3 segments). This can break existing “fetch a JSON file by path” behavior in resolvers and also contradicts the new docs statement (“An address ending in .json is treated as a file path.”). Consider explicitly excluding .json-suffixed last segments (or otherwise disambiguating file-path-style inputs) from GitHub item address parsing.
    packages/cli/test/utils/registry-github.test.ts:1
  • The ref resolution path relies on git ls-remote --symref output, but there’s no test coverage for resolving the default case (ref omitted → HEAD). Given the current parsing behavior, it’s easy to regress (or miss) mapping HEAD to the default branch SHA. Add a test that exercises resolveGitHubRef with no address.ref and validates it returns the resolved SHA from a symref output.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

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

Successfully merging this pull request may close these issues.

GitHub Registries

3 participants