Edits history of script submission #314 for ' Get Repo Star Count (github)'

  • deno
    import { Octokit } from "https://esm.sh/octokit?dts";
    
    /**
     * @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.
     */
    type Github = {
      token: string;
    };
    export async function main(gh_auth: Github, owner: string, repo: string) {
      const octokit = new Octokit({ auth: gh_auth.token });
    
      const repository = await octokit.request("GET /repos/{owner}/{repo}", {
        owner,
        repo,
        headers: {
          "X-GitHub-Api-Version": "2022-11-28",
          Accept: "application/vnd.github+json",
        },
      });
    
      return repository?.data?.stargazers_count;
    }
    

    Submitted by hugo697 398 days ago

  • deno
    import { Octokit } from "https://esm.sh/octokit?dts";
    
    /**
     * @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.
     */
    type Github = {
      token: string;
    };
    export async function main(gh_auth: Github, owner: string, repo: string) {
      const octokit = new Octokit({ auth: gh_auth.token });
    
      const repository = await octokit.request("GET /repos/{owner}/{repo}", {
        owner,
        repo,
        headers: {
          "X-GitHub-Api-Version": "2022-11-28",
          Accept: "application/vnd.github+json",
        },
      });
    
      return repository?.data?.stargazers_count;
    }
    

    Submitted by hugo697 954 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.
     */
    type Github = {
      token: string;
    };
    export async function main(gh_auth: Github, owner: string, repo: string) {
      const octokit = new Octokit({ auth: gh_auth.token });
    
      const repository = await octokit.request("GET /repos/{owner}/{repo}", {
        owner,
        repo,
        headers: {
          "X-GitHub-Api-Version": "2022-11-28",
          Accept: "application/vnd.github+json",
        },
      });
    
      return repository?.data?.stargazers_count;
    }
    

    Submitted by admin 1031 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.
     */
    type Github = {
      token: string;
    };
    export async function main(
      gh_auth: Github,
      owner: string,
      repo: string,
    ) {
      const octokit = new Octokit({ auth: gh_auth.token });
    
      const repository = await octokit.request("GET /repos/{owner}/{repo}", {
        owner,
        repo,
        headers: {
          "X-GitHub-Api-Version": "2022-11-28",
          Accept: "application/vnd.github+json",
        },
      });
    
      return repository?.data?.stargazers_count;
    }
    

    Submitted by admin 1034 days ago

  • deno
    import * as wmill 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.
     */
    export async function main(
      gh_auth: wmill.Resource<"github">,
      owner: string,
      repo: string,
    ) {
      const octokit = new Octokit({ auth: gh_auth.token });
    
      const repository = await octokit.request("GET /repos/{owner}/{repo}", {
        owner,
        repo,
        headers: {
          "X-GitHub-Api-Version": "2022-11-28",
          Accept: "application/vnd.github+json",
        },
      });
    
      return repository?.data?.stargazers_count;
    }
    

    Submitted by adam186 1160 days ago