Wire GitHub App auth through workflows

This commit is contained in:
lezi-fun committed 2026-05-17 17:28:33 +08:00
1 parent 9a0a0cdf45
commit 8505a5b4fc
5 files changed
+61 -4

No files matched your search

+1 -1
View File
@@ -28,7 +28,7 @@ const envBoolean = z.preprocess((value) => {
const configSchema = z.object({
port: z.coerce.number().int().positive().default(3000),
githubToken: z.string().min(1),
githubToken: optionalString,
githubAppId: optionalString,
githubAppPrivateKey: optionalString,
githubAppInstallationId: z.preprocess((value) => {
+6
View File
@@ -45,6 +45,12 @@ export async function createGitHubClient(params?: {
}
}
if (!config.githubToken) {
throw new Error(
"GitHub authentication is not configured. Provide GITHUB_TOKEN, or set GITHUB_APP_ID and GITHUB_APP_PRIVATE_KEY."
);
}
return new Octokit({
auth: config.githubToken
});