Search
Code212
const order = "desc"; const url = `https://api.github.com/search/repositories?q=${encodeURIComponent(query)}&sort=${sort}&order=${order}`; const response = await fetch(url, {
async getRepoContent(repo: string, path: string, branch: string) { const response = await fetch(`https://api.github.com/repos/${repo}/contents/${path}?ref=${branch}`, { method: 'GET', headers: { async getFileSHA(repo: string, path: string, branch: string) { const response = await fetch(`https://api.github.com/repos/${repo}/contents/${path}?ref=${branch}`, { method: 'GET', headers: { async updateFile(repo: string, path: string, content: string, sha: string, message: string, branch: string) { const response = await fetch(`https://api.github.com/repos/${repo}/contents/${path}`, { method: 'PUT', headers: { async createFile(repo: string, path: string, content: string, message: string, branch: string) { const url = `https://api.github.com/repos/${repo}/contents/${path}`; let body: any = { async getCommitHistory(repo: string, path: string, branch: string) { const response = await fetch(`https://api.github.com/repos/${repo}/commits?path=${path}&sha=${branch}`, { method: 'GET', headers: {
const response = await fetch( `https://api.github.com/search/issues?q=repo:${GITHUB.REPOSITORY}+author:${GITHUB.USERNAME}+created:>${timeAgo}+type:pr`, { headers: {
}) { const response = await fetch( `https://api.github.com/repos/${repoOwner}/${repoName}/milestones?state=open&sort=due_on&direction=asc`, { headers: { const response = await fetch( `https://api.github.com/repos/${repoOwner}/${repoName}/issues`, { method: "POST",
` const response = await fetch("https://api.github.com/graphql", { method: "POST", headers: {
`; const response = await fetch("https://api.github.com/graphql", { method: "POST", headers: {
const order = "desc"; const url = `https://api.github.com/search/repositories?q=${encodeURIComponent(query)}&sort=${sort}&order=${order}`; const response = await fetch(url, {
};const GH = `https://api.github.com/repos`;const GH_STORAGE = "https://raw.githubusercontent.com";
clientId: Deno.env.get("GITHUB_OAUTH_TEST1_CLIENT"), clientSecret: Deno.env.get("GITHUB_OAUTH_TEST1_SECRET"), userInfoUrl: "https://api.github.com/user" }, google: {
try { const tokens = await github.validateAuthorizationCode(code); const githubUserResponse = await fetch("https://api.github.com/user", { headers: { Authorization: `Bearer ${tokens.accessToken}`