Skip to content

feat(advisor): resolve --repo by name via the connected-repos API#806

Open
benw5483 wants to merge 1 commit into
mainfrom
feat/advisor-repo-by-name
Open

feat(advisor): resolve --repo by name via the connected-repos API#806
benw5483 wants to merge 1 commit into
mainfrom
feat/advisor-repo-by-name

Conversation

@benw5483

Copy link
Copy Markdown
Contributor

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 (or owner/name to 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

  • 100% per-file line coverage on every changed file; clippy -D warnings clean; cargo fmt clean; full test suite green.
  • Five files changed: the API client (a new list_connected_repos method plus response types), a new RepoNotFound error, the advisor command wiring, and the --repo help text.

Draft for review.

`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>
@benw5483 benw5483 marked this pull request as ready for review July 13, 2026 18:22
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.

1 participant