Update Pull Request

Updates an existing pull request

Usage #

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

title string

Pull request title

body string

Pull request body

state string

Pull request state

values: open, closed
base string

Base branch to change to

maintainer_can_modify bool

Allow maintainer edits

This tool calls: #

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