List repos
Lists the GitHub repositories the caller may work on, most recently pushed first, searched and paged on the server.
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 GitHub repositories the caller may work on, most recently pushed first, searched and paged on the server.
A person who connected their own GitHub sees what their token reaches in this App's installations. An org admin who has not sees every repository in the installations their org holds. Anyone else gets an empty page with connected:false, which is the console's cue to ask them to connect.
Request
4 fields.
| Field | In | Type | Required | Description |
|---|---|---|---|---|
q | query | string | — | Q keeps repositories whose owner/name contains it, case-insensitively. |
owner | query | string | — | Owner keeps one GitHub account's repositories — an org or a user login. |
limit | query | integer | — | Limit is the page size: 1 to 100, and 50 when absent or unreadable. |
after | query | string | — | After is the next of the previous page. |
Response
| Status | Body | Meaning |
|---|---|---|
200 | provider.githubReposOut | ok |
default | problem-details | refused |
200 body — 13 fields.
| Field | In | Type | Always | Description |
|---|---|---|---|---|
connected | body | boolean | — | Connected is whether this answer is the caller's OWN GitHub. |
next | body | string | — | Next is the cursor for the page after this one; empty on the last page. |
repos | body | provider.githubRepoItem[] | — | Repos is this page, most recently pushed first. |
repos[].codebase | body | string | — | Codebase is the name it has in the org's code workspace once brought in (POST /v1/provider/github/repos/import): listed by GET /v1/git/repos when it is there. |
repos[].default_branch | body | string | — | DefaultBranch is the branch GitHub opens it on. |
repos[].full_name | body | string | — | FullName is owner/name, the address a coding run, a branch listing and a deploy take. |
repos[].installation_id | body | integer (int64) | — | InstallationID is the installation of the Hanzo Platform App that reaches it — the grant a run on it is minted from. |
repos[].name | body | string | — | Name is its name within that account. |
repos[].owner | body | string | — | Owner is the GitHub account that holds it. |
repos[].private | body | boolean | — | Private is GitHub's visibility bit. |
repos[].pushed_at | body | string | — | PushedAt is when anything was last pushed to it, RFC 3339 UTC. |
total | body | integer (int64) | — | Total is how many repositories match q and owner, across every page. |
unread | body | string[] | — | Unread names the installations that could not be read, so a short list is distinguishable from a complete one. |
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();curl https://api.hanzo.ai/v1/provider/github/repos \
-H "Authorization: Bearer $HANZO_API_KEY"MCP reaches provider through the provider tool, which names its 38 operations with its own verbs — this one among them, under a name only MCP declares. describe explains any of them:
curl -X POST https://api.hanzo.ai/v1/mcp \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "describe",
"arguments": {
"op": "list_connections"
}
}
}'