Edits history of script submission #315 for ' Create Issue (github)'

  • deno
    One script reply has been approved by the moderators
    Ap­pro­ved
    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 386 days ago

  • deno
    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 946 days ago

  • deno
    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 1018 days ago

  • deno
    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 1022 days ago

  • deno
    import { Resource } from "https://deno.land/x/[email protected]/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 1148 days ago