Skip to content

Warn when an extraRepos entry cannot track a repository - #2541

Open
MPIsaac-Per wants to merge 1 commit into
get-bb:mainfrom
MPIsaac-Per:fix/github-extrarepos-wildcard
Open

Warn when an extraRepos entry cannot track a repository#2541
MPIsaac-Per wants to merge 1 commit into
get-bb:mainfrom
MPIsaac-Per:fix/github-extrarepos-wildcard

Conversation

@MPIsaac-Per

Copy link
Copy Markdown
Contributor

What was wrong

discoverRepos parsed the extraRepos setting by filtering the split entries through isRepoName and keeping the survivors. Anything that failed the test had no else branch: no warning, no error, no record. A wildcard such as owner/*, or a plain typo, therefore behaved exactly like a setting that was working and had simply found nothing, and the only way to discover the difference was to read the regex.

Fixes #2540

What changed

  • plugins/github/server.ts: added an exported parseExtraRepos that splits the setting into valid and invalid entries instead of filtering in place. discoverRepos tracks the valid ones as before and emits bb.log.warn for each invalid one, naming the entry and the expected owner/repo shape.

No wire, CLI, or settings-schema changes. extraRepos keeps its meaning and its type; wildcards remain unsupported, they are just no longer silent about it.

How you verified

  • plugins/github/server.test.ts: a unit test over parseExtraRepos covering a wildcard, a typo, a mixed list, and blank or separator-only input.

  • plugins/github/server.rpc.test.ts: a behavioral test asserting that with extraRepos: "acme/widgets, ACME/*" the valid sibling still syncs one repo and a warn entry naming ACME/* reaches harness.logEntries.

  • Both fail before this change and pass after. Reverting server.ts alone: 25 passed, 2 failed. With the change: 27 passed.

  • pnpm exec turbo run typecheck test --filter=bb-plugin-github passes.

  • Manually on a dev instance at this commit: extraRepos = "MPIV-AI/*, mpiv-ai/clipscript" now logs

    WARN: [server] [plugin:github] extraRepos entry "MPIV-AI/*" is not an owner/repo name and tracks nothing. List each repository explicitly, for example "owner/repo".
    

    while mpiv-ai/clipscript beside it still tracks and syncs.

AGENT GENERATED

The GitHub plugin's extraRepos setting filtered its entries through
isRepoName and dropped everything that failed, with no log line and no
error. A typo or a wildcard such as "owner/*" was therefore
indistinguishable from a setting that worked: the panel simply showed
the repos discovered from BB project checkouts.

Split the parse into valid and invalid entries and warn for each entry
that cannot become a repository, naming the entry and the expected
owner/repo shape.
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 plugin silently discards extraRepos entries that are not owner/repo

1 participant