Get Repository Branch

Gets detailed information about a branch

Usage #

// Import the typed helper
import { getRepoBranch } from "@hotglue/sdk/github";
const result = await client.execute({
...getRepoBranch({
owner: string,
repo: string,
branch: string,
}),
userId: "user_123",
});
// result is typed as GetRepoBranchOutput
const result = await client.execute({
integration: "github",
tool: "get_repo_branch",
userId: "user_123",
input: {
owner: string,
repo: string,
branch: string,
},
});
// 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 Get Repository Branch tool");

Required Permissions #

repo

Input Schema #

owner string required

Repository owner

repo string required

Repository name

branch string required

Branch name

This tool calls: #

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