Skip to content

Commit

Permalink
Link to github app in .env for slugEnv (#1360)
Browse files Browse the repository at this point in the history
  • Loading branch information
tordans authored Nov 21, 2024
1 parent da12a57 commit 0d69577
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/spotty-badgers-punch.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@keystatic/core": patch
---

Add link to created GitHub App in generated `.env`
6 changes: 5 additions & 1 deletion packages/keystatic/src/api/api-node.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,11 @@ export async function handleGitHubAppCreation(
KEYSTATIC_GITHUB_CLIENT_ID=${ghAppDataResult.client_id}
KEYSTATIC_GITHUB_CLIENT_SECRET=${ghAppDataResult.client_secret}
KEYSTATIC_SECRET=${randomBytes(40).toString('hex')}
${slugEnvVarName ? `${slugEnvVarName}=${ghAppDataResult.slug}\n` : ''}`;
${
slugEnvVarName
? `${slugEnvVarName}=${ghAppDataResult.slug} # https://github.com/apps/${ghAppDataResult.slug}\n`
: ''
}`;

let prevEnv: string | undefined;
try {
Expand Down

0 comments on commit 0d69577

Please sign in to comment.