Create Issue ( github)
One script reply has been approved by the moderators Verified

Created by saskiablueeyes19 243 days ago Viewed 73 times 1 Point

No comments yet

Login to be able to comment
Points: 0
deno
One script reply has been approved by the moderators
Ap­pro­ved
import * as wmill from "https://deno.land/x/windmill@v1.12.0/index.ts";
import { Octokit } from "https://cdn.skypack.dev/octokit?dts";

/*
@param: {wmill.Resource<"github">} gh_auth - Resource containing Github Auth API Key
example:
{
    auth: github_api_key
}
@param: {string} owner - Github username of repo owner
@param: {string} repo - Github repo name
@param: {string} title - title of Github issue
@param: {string} body - body of Github issue
*/

export async function main(
  gh_auth: wmill.Resource<"github">,
  owner: string,
  repo: string,
  title: string,
  body: string,
) {
  const octokit = new Octokit(gh_auth);

  const response = await octokit.rest.issues.create({
    owner: owner,
    repo: repo,
    title: title,
    body: body,
  });

  return response;
}

Submitted by rossmccrann 233 days ago

Edited 190 days ago

No comments yet

Login to be able to comment