List repos
Lists the org's granted GitHub repositories, each annotated with its native import + sync status from the git object plane.
GET /v1/provider/github/repos
| Address | https://api.hanzo.ai/v1/provider/github/repos |
| Method | GET |
| Operation | get_provider_github_repos |
| Auth | Authorization: Bearer $HANZO_API_KEY |
Lists the org's granted GitHub repositories, each annotated with its native import + sync status from the git object plane. Org-authed: the org comes from the validated principal, and the granted set is bounded to THAT org's installation token — an org can never enumerate another org's repos. The console polls it to watch an import flip a repo to imported.
Request
GET /v1/provider/github/repos takes no parameters and no body — the credential is the whole request.
Response
| Status | Body | Meaning |
|---|---|---|
200 | provider.githubReposOut | ok |
default | problem-details | refused |
200 body — 10 fields.
| Field | In | Type | Always | Description |
|---|---|---|---|---|
repos | body | provider.githubRepoView[] | — | Repos is every repo the installation grants. |
repos[].defaultBranch | body | string | — | DefaultBranch is the repo's default branch at GitHub. |
repos[].fullName | body | string | — | FullName is GitHub's owner/name. |
repos[].htmlUrl | body | string | — | HTMLURL is the repo's page at GitHub. |
repos[].imported | body | boolean | — | Imported is whether this repo has been mirrored into git.hanzo.ai. |
repos[].lastSyncedAt | body | string | — | LastSyncedAt is the last successful mirror, RFC 3339 UTC. |
repos[].name | body | string | — | Name is the repository's short name within the installation. |
repos[].private | body | boolean | — | Private is GitHub's visibility bit for the repo. |
repos[].syncStatus | body | string | — | SyncStatus is "synced", "conflict", or "" when the repo is not imported. |
unread | body | string[] | — | Unread names the connected accounts this answer could NOT read, so a short list is distinguishable from a complete one. Absent when the answer is whole. |
Failure carries the platform error shape — see Errors.
Examples
hanzo provider github repos listimport { Configuration, ProviderApi } from 'hanzoai';
const api = new ProviderApi(new Configuration({ accessToken: process.env.HANZO_API_KEY }));
const { data } = await api.getProviderGithubRepos();from hanzoai.cloud import ApiClient, Configuration
from hanzoai.cloud.api import ProviderApi
client = ApiClient(Configuration(access_token=os.environ["HANZO_API_KEY"]))
result = ProviderApi(client).get_provider_github_repos()cfg := hanzoai.NewConfiguration()
cfg.AddDefaultHeader("Authorization", "Bearer "+os.Getenv("HANZO_API_KEY"))
client := hanzoai.NewAPIClient(cfg)
resp, _, err := client.ProviderAPI.GetProviderGithubRepos(context.Background()).Execute()
if err != nil {
return err
}use hanzo_client::apis::{configuration::Configuration, provider_api};
let mut cfg = Configuration::new();
cfg.bearer_access_token = std::env::var("HANZO_API_KEY").ok();
let result = provider_api::get_provider_github_repos(&cfg, Default::default()).await?;import ai.hanzo.cloud.ApiClient;
import ai.hanzo.cloud.api.ProviderApi;
ApiClient client = new ApiClient();
client.setBearerToken(System.getenv("HANZO_API_KEY"));
var result = new ProviderApi(client).getProviderGithubRepos();The method above is the one at the current release of the document. [email protected] (npm) was generated from an earlier release, where this operation carried a different id, so it spells the method differently — regenerating the clients is what makes the two agree. SDKs →
curl https://api.hanzo.ai/v1/provider/github/repos \
-H "Authorization: Bearer $HANZO_API_KEY"MCP declares no tool for provider — tools/list on https://api.hanzo.ai/v1/mcp names the products it does reach. Use HTTP or an SDK.
How is this guide?