Initial commit

This commit is contained in:
Lina Tawfik
2025-05-19 08:32:32 -07:00
commit f66f337f4e
58 changed files with 8913 additions and 0 deletions

20
src/github/api/client.ts Normal file
View File

@@ -0,0 +1,20 @@
import { Octokit } from "@octokit/rest";
import { graphql } from "@octokit/graphql";
import { GITHUB_API_URL } from "./config";
export type Octokits = {
rest: Octokit;
graphql: typeof graphql;
};
export function createOctokit(token: string): Octokits {
return {
rest: new Octokit({ auth: token }),
graphql: graphql.defaults({
baseUrl: GITHUB_API_URL,
headers: {
authorization: `token ${token}`,
},
}),
};
}