List Repository Branches

Lists branches for a repository

Usage #

// Import the typed helper
import { listRepoBranches } from "@hotglue/sdk/github";
const result = await client.execute({
...listRepoBranches({
owner: string,
repo: string,
protected: bool,
// ...
}),
userId: "user_123",
});
// result is typed as ListRepoBranchesOutput
const result = await client.execute({
integration: "github",
tool: "list_repo_branches",
userId: "user_123",
input: {
owner: string,
repo: string,
protected: bool,
// ...
},
});
// The agent will automatically use this tool when needed
const agent = new Agent({
tools: () => hotglueTools({
integrations: ["github"],
userId: "user_123",
}),
});
await agent.generate("run the List Repository Branches tool");

Required Permissions #

repo

Input Schema #

owner string required

Repository owner

repo string required

Repository name

protected bool

Filter to only protected branches

per_page int
default: 30
page int
default: 1

This tool calls: #

GET https://api.github.com/repos/{owner}/{repo}/branches