feat(home): suggest 'All repos in ORG' in the Add Repo dropdown#361
Merged
Conversation
When the user opens the Add Repo dropdown and types a bare org name (non-empty query, no `/`), surface an "All repos in \"<query>\"" suggestion above the repo search results. Selecting it adds a new org-scoped repo filter that emits `org:<name>` in the GitHub PR search query, equivalent to the `owner/repo`-based filters but scoped to the whole organization. Once the query contains a `/` the user is narrowing to a specific repo, so the org suggestion disappears from the list. The org filter is encoded in the existing RepoFilter.name field with an `__org__:` sentinel prefix (mirroring how `__all_repos__` is represented), so the existing storage shape and dedupe/enable/mode plumbing keeps working. `buildSearchQueries` gains a new branch that groups org filters by mode+authoredBy and emits `org:<name>` qualifiers (multiple orgs OR just like multiple `repo:` qualifiers). The chip renders as `org:<name>` with the same primary tint used by "All Repos". All modes stay available on org filters — unlike `__all_repos__`, `org:<name>` is already bounded, so `is:pr org:foo` is a reasonable query. Resolves #360
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.
When the user opens the Add Repo dropdown and types a bare org name (non-empty query, no
/), surface an "All repos in """ suggestion above the repo search results. Selecting it adds a new org-scoped repo filter that emitsorg:<name>in the GitHub PR search query, equivalent to theowner/repo-based filters but scoped to the whole organization.Once the query contains a
/the user is narrowing to a specific repo, so the org suggestion disappears from the list.The org filter is encoded in the existing RepoFilter.name field with an
__org__:sentinel prefix (mirroring how__all_repos__is represented), so the existing storage shape and dedupe/enable/mode plumbing keeps working.buildSearchQueriesgains a new branch that groups org filters by mode+authoredBy and emitsorg:<name>qualifiers (multiple orgs OR just like multiplerepo:qualifiers). The chip renders asorg:<name>with the same primary tint used by "All Repos". All modes stay available on org filters — unlike__all_repos__,org:<name>is already bounded, sois:pr org:foois a reasonable query.Resolves #360