Thanks to visit codestin.com
Credit goes to hub.windmill.dev

Get Repository
Codestin Search App Verified
Created by paulpres5s1zi 1306 days ago Picked 16 times
Submitted by adam186 Deno
Verified 241 days ago
1
import { Octokit } from "https://cdn.skypack.dev/@octokit/rest";
2

3
/**
4
 * @param owner The account owner of the repository. The name is not case sensitive.
5
 *
6
 * @param repo The name of the repository. The name is not case sensitive.
7
 */
8
type Github = {
9
  token: string;
10
};
11
export async function main(gh_auth: Github, owner: string, repo: string) {
12
  const octokit = new Octokit({ auth: gh_auth.token });
13

14
  return await octokit.request("GET /repos/{owner}/{repo}", {
15
    owner,
16
    repo,
17
    headers: {
18
      "X-GitHub-Api-Version": "2022-11-28",
19
      Accept: "application/vnd.github+json",
20
    },
21
  });
22
}
23

Other submissions