Skip to main content

github.github.createissue

Home > @runlightyear/github > GitHub > createIssue

GitHub.createIssue() method

Create an issue

Signature:
createIssue(props: CreateIssueProps): Promise<HttpProxyResponse>;

Parameters

ParameterTypeDescription
propsCreateIssuePropsprops
Returns:

Promise<HttpProxyResponse>

Example

Create an issue

import { defineAction } from "@runlightyear/lightyear";
import { GitHub } from "@runlightyear/github";

defineAction({
name: "createIssue",
title: "Create Issue",
apps: ["github"],
variables: [
{
name: "owner",
description:
"The account owner of the repository. The name is not case sensitive.",
},
{
name: "repo",
description:
"The name of the repository without the .git extension. The name is not case sensitive.",
},
"title",
],
run: async ({ auths, variables }) => {
const github = new GitHub({
auth: auths.github,
});
const response = await github.createIssue({
owner: variables.owner!,
repo: variables.repo!,
title: variables.title!,
});
console.log("Response: ", response.data);
},
});