octokit() — supabase Function Reference
Architecture documentation for the octokit() function in octokit.ts from the supabase codebase.
Entity Profile
Dependency Diagram
graph TD 849f251d_84e6_f75c_65e8_837d964c4544["octokit()"] ed633091_0e4b_ed01_baa2_fe2bbb0be3f4["getLatestRelease()"] ed633091_0e4b_ed01_baa2_fe2bbb0be3f4 -->|calls| 849f251d_84e6_f75c_65e8_837d964c4544 fa70cd46_6219_d8e8_0dc2_82ecdff73892["getGitHubFileContents()"] fa70cd46_6219_d8e8_0dc2_82ecdff73892 -->|calls| 849f251d_84e6_f75c_65e8_837d964c4544 65d39265_59d2_2308_2c7d_2d59c9134267["checkForImmutableCommit()"] 65d39265_59d2_2308_2c7d_2d59c9134267 -->|calls| 849f251d_84e6_f75c_65e8_837d964c4544 style 849f251d_84e6_f75c_65e8_837d964c4544 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
apps/docs/lib/octokit.ts lines 11–35
export function octokit() {
if (!octokitInstance) {
const privateKey = process.env.DOCS_GITHUB_APP_PRIVATE_KEY
if (!privateKey) {
throw new Error('DOCS_GITHUB_APP_PRIVATE_KEY environment variable is required')
}
// https://github.com/gr2m/universal-github-app-jwt?tab=readme-ov-file#converting-pkcs1-to-pkcs8
const privateKeyPkcs8 = crypto.createPrivateKey(privateKey).export({
type: 'pkcs8',
format: 'pem',
})
octokitInstance = new Octokit({
authStrategy: createAppAuth,
auth: {
appId: process.env.DOCS_GITHUB_APP_ID,
installationId: process.env.DOCS_GITHUB_APP_INSTALLATION_ID,
privateKey: privateKeyPkcs8,
},
})
}
return octokitInstance
}
Domain
Subdomains
Source
Frequently Asked Questions
What does octokit() do?
octokit() is a function in the supabase codebase.
What calls octokit()?
octokit() is called by 3 function(s): checkForImmutableCommit, getGitHubFileContents, getLatestRelease.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free