Create Label

Creates a new label in a repository

Usage #

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

Required Permissions #

repo

Input Schema #

owner string required

Repository owner

repo string required

Repository name

name string required

Label name

color string required

Color hex code (without #)

description string

Short description

Output Schema #

id int required
name string required
color string required
description string

This tool calls: #

POST https://api.github.com/repos/{owner}/{repo}/labels