Skip to content

feat(install): make the bub-contrib install URL configurable - #411

Merged
PsiACE merged 6 commits into
mainfrom
feat/configurable-bub-contrib-repo
Nov 21, 2026
Merged

PsiACE merged 6 commits into
mainfrom
feat/configurable-bub-contrib-repo

Conversation

@PsiACE

@PsiACE PsiACE commented Nov 21, 2026 •

Copy link
Copy Markdown
Member

Summary

Let bub install name@ref use a custom Git repository via contrib_repo in config.yml or BUB_CONTRIB_REPO. The official repository remains the default. #subdirectory= can override packages/name.

Verification

  • One CLI regression test covers a configured SSH repository and custom subdirectory.
  • pytest -q: 740 passed, 20 skipped. Ruff and mypy passed.

`bub install <name>@<ref>` always resolved `packages/<name>` from the hardcoded
official bub-contrib repository, so a fork or mirror could not be used for the
`name@ref` shorthand.

`InstallSettings` registers a `bub_contrib_repo` setting, read like the other
flat settings: `BUB_CONTRIB_REPO` (including `.env`) takes precedence over the
top-level `bub_contrib_repo` in `config.yml`. When neither is set, the official
repository stays the default, and the explicit Git URL and `owner/repo` spec
forms are untouched.

The configured value is validated only when the shorthand is resolved. It must
be an `https://` or `ssh://` Git URL without a ref, query, fragment, or
credentials, because the ref and subdirectory are appended to it and recorded
in the managed project's `pyproject.toml`. A bad value fails only that spec and
never blocks other commands, `bub install` without specs, or other spec forms;
the value is not echoed in the error, so inline credentials stay out of logs.
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Nov 21, 2026 •

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
bub b10ff2a Commit Preview URL

Branch Preview URL
Nov 21 2026, 06:31 AM

@PsiACE PsiACE changed the title Make the bub-contrib install URL configurable feat(install): make the bub-contrib install URL configurable Nov 21, 2026
@PsiACE
PsiACE marked this pull request as ready for review November 21, 2026 06:04
@PsiACE
PsiACE merged commit a1133aa into main Nov 21, 2026
7 checks passed
@PsiACE
PsiACE deleted the feat/configurable-bub-contrib-repo branch November 21, 2026 06:37
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.

1 participant