feat(advisor): resolve --repo by name via the connected-repos API#806
Open
benw5483 wants to merge 1 commit into
Open
feat(advisor): resolve --repo by name via the connected-repos API#806benw5483 wants to merge 1 commit into
benw5483 wants to merge 1 commit into
Conversation
`actual advisor --repo <value>` now accepts a connected repository's name
in addition to a UUID. A value that parses as a UUID is used directly, as
before. Any other value is resolved to a repo id by listing the
organization's connected repositories (GET /v1/connected-repos) and
matching on name, or on `owner/name` to disambiguate a name shared across
owners. An unrecognized or ambiguous name fails with a clear message that
lists the repositories to choose from.
- api: add `ActualApiClient::list_connected_repos` plus the
`ConnectedRepository` / `GetConnectedReposResponse` types. This endpoint
returns a flat `{error, message}` error body, so it gets its own error
mapper, distinct from the advisor routes' nested `{error:{code,message}}`.
- error: add `RepoNotFound`, carrying the listed-repositories message and
an actionable fix hint.
- advisor: resolve `--repo` before building the query. A 403 during the
lookup gets the same cross-org guidance as the query itself.
Per-file line coverage stays at 100%.
Generated by the operator's software factory.
City: factory-main · Agent: local-core.builder-1
On behalf of: @benw5483
Co-Authored-By: <operator-factory-bot> <factory-bot@<operator-domain>.invalid>
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.
What
actual advisor --repo <value>now accepts a connected repository's name, not only its UUID. A UUID still works exactly as before. A name is resolved to a repository id via the connected-repos API, matching on the repo name (orowner/nameto disambiguate a name shared by two owners). An unrecognized or ambiguous name fails with a clear message listing the repositories you can pick from.Quality
-D warningsclean;cargo fmtclean; full test suite green.list_connected_reposmethod plus response types), a newRepoNotFounderror, the advisor command wiring, and the--repohelp text.Draft for review.