Get Pull Request

Gets a specific pull request by number

Usage #

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

Required Permissions #

repo

Input Schema #

owner string required

Repository owner

repo string required

Repository name

pull_number string required

Pull request number

Output Schema #

id int required
number int required
title string required
body string
state string required
values: open, closed
html_url string required
diff_url string
patch_url string
merged bool
mergeable bool
draft bool
additions int
deletions int
changed_files int
created_at string required
updated_at string
merged_at string
closed_at string

This tool calls: #

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