List Pull Requests

Lists pull requests in a repository

Usage #

// Import the typed helper
import { listPullRequests } from "@hotglue/sdk/github";
const result = await client.execute({
...listPullRequests({
owner: string,
repo: string,
state: string,
// ...
}),
userId: "user_123",
});
// result is typed as ListPullRequestsOutput
const result = await client.execute({
integration: "github",
tool: "list_pull_requests",
userId: "user_123",
input: {
owner: string,
repo: string,
state: 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 List Pull Requests tool");

Required Permissions #

repo

Input Schema #

owner string required

Repository owner

repo string required

Repository name

state string
default: open values: open, closed, all
head string

Filter by head user/org and branch (format: user:ref-name)

base string

Filter by base branch name

sort string
default: created values: created, updated, popularity, long-running
direction string
default: desc values: asc, desc
per_page int
default: 30
page int
default: 1

This tool calls: #

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