refactor(web/server): consolidate GitHub utilities into single module (#436)

This commit is contained in:
Nelson Pires
2026-02-16 22:58:56 +02:00
committed by GitHub
parent 4fce1c9f9f
commit 58b27fa621
8 changed files with 89 additions and 19 deletions
+10
View File
@@ -0,0 +1,10 @@
import { Octokit } from '@octokit/rest';
import { getGitHubAuth } from './auth.js';
export function getOctokitOrNull() {
const auth = getGitHubAuth();
if (!auth?.accessToken) {
return null;
}
return new Octokit({ auth: auth.accessToken });
}