Add cross-repo id resolution + bw config set prefix with alias tracking#123
Merged
Conversation
670af61 to
9e66207
Compare
a82273e to
f1c0bb6
Compare
9e66207 to
ae165a8
Compare
ae165a8 to
a94d956
Compare
ff34349 to
061a26a
Compare
061a26a to
9053db5
Compare
3fee8ff to
756a217
Compare
9053db5 to
45a1d7b
Compare
iautom8things
approved these changes
May 8, 2026
Collaborator
There was a problem hiding this comment.
I'm good to merge this, as well, after #122 lands. I've been testing it locally and it looks good. 🚀 🚀 🚀
Teach the id resolver to consult the registry when a prefix doesn't belong to the current repo: - ec-42 in repo with prefix "bw" resolves to the repo registered under prefix "ec", as long as the prefix is unambiguous - Ambiguous prefixes (multiple repos claim it) produce a clear error pointing at both paths - -C now accepts either a path or a registered prefix/alias, so `bw -C ec list` works from anywhere
Let users rename a repo's prefix without losing history or breaking cross-repo references: - Open issues are renamed in place (filenames + content updated) - Closed issues keep their original IDs so git history stays intact - The old prefix is recorded as an alias in .bwconfig, so cross-repo lookups for old IDs continue to resolve - Aliases are skipped when another repo has since claimed the old prefix, avoiding ambiguity errors on rename
Staticcheck flags containsStr, contains (treefs_test.go) and isPrefixCandidate (cross_repo.go) as U1000. The treefs helpers were orphaned when "Record unblocked events" swapped to errors.Is. The prefix-candidate check is no longer called from the -C path after the registry-backed resolver landed.
It never modifies the global config — the two-value return was unnecessary ceremony from the rebase.
config set prefix is now a plain SetConfig like any other key — no issue renaming, no alias bookkeeping, no collision detection for aliases. Removes config_prefix.go, Aliases/SetAliases from repo, and alias support from the registry and cross-repo resolver.
45a1d7b to
4a22240
Compare
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.
Cross-repo issue resolution via registry prefix lookup.
bw show r0-abcfrom any repo resolvesr0to the registered repo and opens that store.-Caccepts a prefix as shorthand for the full path.bw config set prefixtracks old prefixes as aliases so cross-repo refs survive renames. Prefixes are resolved live from each repo's.bwconfig, not cached in the registry.