Usage #
// Import the typed helper
import { createPullRequest } from "@hotglue/sdk/github";
const result = await client.execute({
...createPullRequest({
owner: string,
repo: string,
title: string,
// ...
}),
userId: "user_123",
});
// result is typed as CreatePullRequestOutput
const result = await client.execute({
integration: "github",
tool: "create_pull_request",
userId: "user_123",
input: {
owner: string,
repo: string,
title: 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 Create Pull Request tool");
Required Permissions #
repo
Input Schema #
owner
string
required
Repository owner
repo
string
required
Repository name
title
string
required
Pull request title
head
string
required
Branch containing changes (e.g., username:branch or branch)
base
string
required
Branch to merge into
body
string
Pull request body (supports Markdown)
draft
bool
Create as draft PR
default:
false
maintainer_can_modify
bool
Allow maintainers to push commits
default:
true
Output Schema #
id
int
required
number
int
required
title
string
required
html_url
string
required
state
string
draft
bool
created_at
string
required
This tool calls: #
POST
https://api.github.com/repos/{owner}/{repo}/pulls