summaryrefslogtreecommitdiffhomepage
path: root/packages/function/src
diff options
context:
space:
mode:
Diffstat (limited to 'packages/function/src')
-rw-r--r--packages/function/src/api.ts20
1 files changed, 16 insertions, 4 deletions
diff --git a/packages/function/src/api.ts b/packages/function/src/api.ts
index 572ac3cab..6f00dae9a 100644
--- a/packages/function/src/api.ts
+++ b/packages/function/src/api.ts
@@ -238,10 +238,16 @@ export default new Hono<{ Bindings: Env }>()
// Lookup installation
const octokit = new Octokit({ auth: appAuth.token })
- const { data: installation } = await octokit.apps.getRepoInstallation({ owner, repo })
+ const { data: installation } = await octokit.apps.getRepoInstallation({
+ owner,
+ repo,
+ })
// Get installation token
- const installationAuth = await auth({ type: "installation", installationId: installation.id })
+ const installationAuth = await auth({
+ type: "installation",
+ installationId: installation.id,
+ })
return c.json({ token: installationAuth.token })
})
@@ -274,10 +280,16 @@ export default new Hono<{ Bindings: Env }>()
// Lookup installation
const appClient = new Octokit({ auth: appAuth.token })
- const { data: installation } = await appClient.apps.getRepoInstallation({ owner, repo })
+ const { data: installation } = await appClient.apps.getRepoInstallation({
+ owner,
+ repo,
+ })
// Get installation token
- const installationAuth = await auth({ type: "installation", installationId: installation.id })
+ const installationAuth = await auth({
+ type: "installation",
+ installationId: installation.id,
+ })
return c.json({ token: installationAuth.token })
} catch (e: any) {