Repository navigation
Names are words, every search lets you pick, setup keeps rules it didn't write - #5
Merged
Merged
Conversation
…n't write A name filter without a wildcard matches whole words of a repo's name: billing matches billing-api, team-billing and BillingPortal but not rebilling, which a substring glob caught. Words split at punctuation, camelCase and where letters meet digits; with *, ? or [...] it is still a glob over the whole name. Setup's preview says how many repos each name matched, so one that catches more than meant stands out, and offers three ways on: track them all, pick from the list -- a checklist with every match ticked -- or choose again. clone with a selection asks the same before cloning anything on a terminal, and names what it searches and where. Repos picked off go in their rule's skip: left out by exact name, while new matches still arrive. Re-running setup read every rule of an account's provider as one of its owners: a rule clone --save added for a search or another user was taken for the account's own repos and rewritten, and two rules for one organization collapsed into one. A track now remembers its rule, an owner can have several, and setup edits only the rules for an organization, a group or the account's own repos, leaving the rest as they are. discover's preview also says how to track more. The README opens a walkthrough of finding repos, the first time and later, with a table of what a name matches that the tests hold it to; SPEC, config.example and the examples say the same.
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.
Why
Searching an org for a team's repos by name caught every name that merely contained the term:
*billing*matchesrebilling. Narrowing the result meant starting the search over. Repos added later withclone --savecould also be rewritten by the nextgitten setup.Changes
billingmatchesbilling-api,team-billingandBillingPortal, but notrebilling. Words split at punctuation, camelCase, and where letters meet digits. With*,?or[...]it's still a glob over the whole name.gitten clonewith a selection asks the same on a terminal before cloning. Repos you untick go in the rule's newskip:, matched by exact name, and new matches still arrive.clonesays what it searches and where (Searching acme's repos on github.com...), anddiscover's preview mentionsclone ... --savefor tracking more.config.example.yamland the examples are updated too.Test plan
go test -race ./..., vet, gofmt, golangci-lint, and the full e2e suite run uncached.skipfiltering and validation;tracksFor,matchCounts, andtrackLabelwithskip.by name: gitten 1, pkg 1, then pick from the list and untick one. The review showedskip: [gitten], and the clone question said 1 repo.clone --org charmbracelet --name bubbleteamatchesbubbleteaandbubbletea-app-template, notbubbles.