Skip to content

Commit db71f94

Browse files
authored
Merge pull request #1 from spacelift-io/prompts-changes
Update the app inline with the changes to the prompts api
2 parents cdd72b8 + c8c3371 commit db71f94

File tree

3 files changed

+10
-8
lines changed

3 files changed

+10
-8
lines changed

main.ts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,8 @@ const EVENT_CONFIG: Record<SupportedEventType, EventConfig> = {
101101
},
102102
};
103103

104+
const createGitHubAppPromptKey = "create-github-app-prompt";
105+
104106
export const app = defineApp({
105107
blocks: {
106108
createBranch,
@@ -254,7 +256,7 @@ export const app = defineApp({
254256
value: data.repositories.map((repo) => repo.full_name),
255257
});
256258

257-
await lifecycle.prompt.delete(value.promptId);
259+
await lifecycle.prompt.delete(createGitHubAppPromptKey);
258260

259261
await kv.app.delete(["manifest"]);
260262

@@ -408,7 +410,8 @@ export const app = defineApp({
408410
url: "https://spaceflows.io",
409411
};
410412

411-
const promptId = await lifecycle.prompt.create(
413+
await lifecycle.prompt.create(
414+
createGitHubAppPromptKey,
412415
"Create a new app GitHub App",
413416
{
414417
redirect: {
@@ -427,7 +430,6 @@ export const app = defineApp({
427430
await kv.app.set({
428431
key: "manifest",
429432
value: {
430-
promptId,
431433
state,
432434
},
433435
});

package-lock.json

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"type": "module",
33
"dependencies": {
4-
"@slflows/sdk": "^0.0.8",
4+
"@slflows/sdk": "^0.2.0",
55
"typescript": "^5.8.3",
66
"@apidevtools/json-schema-ref-parser": "^12.0.2",
77
"@octokit/app": "^16.0.1",

0 commit comments

Comments
 (0)