import { Octokit } from "https://cdn.skypack.dev/@octokit/rest";
/**
* @param owner The account owner of the repository. The name is not case sensitive.
*
* @param repo The name of the repository. The name is not case sensitive.
*
* @param title The title of the new issue.
*
* @param body The body of the new issue.
*
* @param assignees Logins for Users to assign to this issue.
* *NOTE*: Only users with push access can set assignees for new issues.
* Assignees are silently dropped otherwise.
*
* @param milestone The number of the milestone to associate this issue with.
* *NOTE*: Only users with push access can set the milestone for new issues.
* The milestone is silently dropped otherwise.
*
* @param labels Labels to associate with this issue.
* *NOTE*: Only users with push access can set labels for new issues.
* Labels are silently dropped otherwise.
*/
type Github = {
token: string;
};
export async function main(
gh_auth: Github,
owner: string,
repo: string,
title: string,
body: string,
assignees?: string[],
milestone?: string | number,
labels?: string[]
) {
const octokit = new Octokit({ auth: gh_auth.token });
return await octokit.request("POST /repos/{owner}/{repo}/issues", {
owner,
repo,
title,
body,
assignees: assignees || [],
milestone,
labels,
headers: {
"X-GitHub-Api-Version": "2022-11-28",
Accept: "application/vnd.github+json",
},
});
}
Submitted by hugo697 424 days ago
import { Octokit } from "https://cdn.skypack.dev/@octokit/rest";
/**
* @param owner The account owner of the repository. The name is not case sensitive.
*
* @param repo The name of the repository. The name is not case sensitive.
*
* @param title The title of the new issue.
*
* @param body The body of the new issue.
*
* @param assignees Logins for Users to assign to this issue.
* *NOTE*: Only users with push access can set assignees for new issues.
* Assignees are silently dropped otherwise.
*
* @param milestone The number of the milestone to associate this issue with.
* *NOTE*: Only users with push access can set the milestone for new issues.
* The milestone is silently dropped otherwise.
*
* @param labels Labels to associate with this issue.
* *NOTE*: Only users with push access can set labels for new issues.
* Labels are silently dropped otherwise.
*/
type Github = {
token: string;
};
export async function main(
gh_auth: Github,
owner: string,
repo: string,
title: string,
body: string,
assignees?: string[],
milestone?: string | number,
labels?: string[],
) {
const octokit = new Octokit({ auth: gh_auth.token });
return await octokit.request("POST /repos/{owner}/{repo}/issues", {
owner,
repo,
title,
body,
assignees: assignees || [],
milestone,
labels,
headers: {
"X-GitHub-Api-Version": "2022-11-28",
Accept: "application/vnd.github+json",
},
});
}
Submitted by admin 497 days ago
import { Octokit } from "https://cdn.skypack.dev/@octokit/rest";
/**
* @param owner The account owner of the repository. The name is not case sensitive.
*
* @param repo The name of the repository. The name is not case sensitive.
*
* @param title The title of the new issue.
*
* @param body The body of the new issue.
*
* @param assignees Logins for Users to assign to this issue.
* *NOTE*: Only users with push access can set assignees for new issues.
* Assignees are silently dropped otherwise.
*
* @param milestone The number of the milestone to associate this issue with.
* *NOTE*: Only users with push access can set the milestone for new issues.
* The milestone is silently dropped otherwise.
*
* @param labels Labels to associate with this issue.
* *NOTE*: Only users with push access can set labels for new issues.
* Labels are silently dropped otherwise.
*/
type Github = {
token: string;
};
export async function main(
gh_auth: Github,
owner: string,
repo: string,
title: string,
body: string,
assignees?: string[],
milestone?: string | number,
labels?: string[],
) {
const octokit = new Octokit({ auth: gh_auth.token });
return await octokit.request("POST /repos/{owner}/{repo}/issues", {
owner,
repo,
title,
body,
assignees: assignees || [],
milestone,
labels,
headers: {
"X-GitHub-Api-Version": "2022-11-28",
Accept: "application/vnd.github+json",
},
});
}
Submitted by admin 500 days ago
import { Resource } from "https://deno.land/x/windmill@v1.85.0/mod.ts";
import { Octokit } from "https://cdn.skypack.dev/@octokit/rest";
/**
* @param owner The account owner of the repository. The name is not case sensitive.
*
* @param repo The name of the repository. The name is not case sensitive.
*
* @param title The title of the new issue.
*
* @param body The body of the new issue.
*
* @param assignees Logins for Users to assign to this issue.
* *NOTE*: Only users with push access can set assignees for new issues.
* Assignees are silently dropped otherwise.
*
* @param milestone The number of the milestone to associate this issue with.
* *NOTE*: Only users with push access can set the milestone for new issues.
* The milestone is silently dropped otherwise.
*
* @param labels Labels to associate with this issue.
* *NOTE*: Only users with push access can set labels for new issues.
* Labels are silently dropped otherwise.
*/
export async function main(
gh_auth: Resource<"github">,
owner: string,
repo: string,
title: string,
body: string,
assignees?: string[],
milestone?: string | number,
labels?: string[],
) {
const octokit = new Octokit({ auth: gh_auth.token });
return await octokit.request("POST /repos/{owner}/{repo}/issues", {
owner,
repo,
title,
body,
assignees: assignees || [],
milestone,
labels,
headers: {
"X-GitHub-Api-Version": "2022-11-28",
Accept: "application/vnd.github+json",
},
});
}
Submitted by adam186 626 days ago