Skip to content

Commit e9964fb

Browse files
authored
feat(x2a): removing user prompt except the project init phase (#2299)
Signed-off-by: Marek Libra <marek.libra@gmail.com>
1 parent 71fa68b commit e9964fb

8 files changed

Lines changed: 10 additions & 28 deletions

File tree

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
'@red-hat-developer-hub/backstage-plugin-x2a-backend': patch
3+
'@red-hat-developer-hub/backstage-plugin-x2a-common': patch
4+
'@red-hat-developer-hub/backstage-plugin-x2a': patch
5+
---
6+
7+
The user prompt is removed except for the project init phase.

workspaces/x2a/plugins/x2a-backend/src/router/modules.ts

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,6 @@ export function registerModuleRoutes(
180180
password: z.string().optional(),
181181
})
182182
.optional(),
183-
userPrompt: z.string().optional(),
184183
});
185184

186185
const parsedBody = runModuleRequestSchema
@@ -189,13 +188,8 @@ export function registerModuleRoutes(
189188
if (!parsedBody.success) {
190189
throw new InputError(`Invalid body ${endpoint}: ${parsedBody.error}`);
191190
}
192-
const {
193-
phase,
194-
sourceRepoAuth,
195-
targetRepoAuth,
196-
aapCredentials,
197-
userPrompt,
198-
} = parsedBody.data;
191+
const { phase, sourceRepoAuth, targetRepoAuth, aapCredentials } =
192+
parsedBody.data;
199193

200194
// Get tokens with config-based fallback
201195
const sourceToken =
@@ -295,7 +289,6 @@ export function registerModuleRoutes(
295289
token: targetToken,
296290
},
297291
aapCredentials,
298-
userPrompt,
299292
});
300293

301294
// Update job with k8s job name

workspaces/x2a/plugins/x2a-backend/src/schema/openapi.yaml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -290,11 +290,7 @@ paths:
290290
targetRepoAuth:
291291
$ref: '#/components/schemas/GitRepoAuth'
292292
aapCredentials:
293-
# TODO: reuse from project's init phase
294293
$ref: '#/components/schemas/AAPCredentials'
295-
userPrompt:
296-
type: string
297-
description: Optional user prompt for customizing the migration
298294
required:
299295
- phase
300296
- sourceRepoAuth

workspaces/x2a/plugins/x2a-backend/src/schema/openapi/generated/models/ProjectsProjectIdModulesModuleIdRunPostRequest.model.ts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,4 @@ export interface ProjectsProjectIdModulesModuleIdRunPostRequest {
2929
sourceRepoAuth: GitRepoAuth;
3030
targetRepoAuth: GitRepoAuth;
3131
aapCredentials?: AAPCredentials;
32-
/**
33-
* Optional user prompt for customizing the migration
34-
*/
35-
userPrompt?: string;
3632
}

workspaces/x2a/plugins/x2a-backend/src/schema/openapi/generated/router.ts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -444,10 +444,6 @@ export const spec = {
444444
},
445445
"aapCredentials": {
446446
"$ref": "#/components/schemas/AAPCredentials"
447-
},
448-
"userPrompt": {
449-
"type": "string",
450-
"description": "Optional user prompt for customizing the migration"
451447
}
452448
},
453449
"required": [

workspaces/x2a/plugins/x2a-common/client/src/schema/openapi/generated/models/ProjectsProjectIdModulesModuleIdRunPostRequest.model.ts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,4 @@ export interface ProjectsProjectIdModulesModuleIdRunPostRequest {
2929
sourceRepoAuth: GitRepoAuth;
3030
targetRepoAuth: GitRepoAuth;
3131
aapCredentials?: AAPCredentials;
32-
/**
33-
* Optional user prompt for customizing the migration
34-
*/
35-
userPrompt?: string;
3632
}

workspaces/x2a/plugins/x2a-common/report.api.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,6 @@ export interface ProjectsProjectIdModulesModuleIdRunPostRequest {
211211
sourceRepoAuth: GitRepoAuth;
212212
// (undocumented)
213213
targetRepoAuth: GitRepoAuth;
214-
userPrompt?: string;
215214
}
216215

217216
// @public (undocumented)

workspaces/x2a/plugins/x2a/src/components/ModuleTable/ModuleTable.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -148,8 +148,7 @@ export const ModuleTable = ({
148148
token:
149149
'TODO:placeholder - the token needs to be renewed for each run',
150150
},
151-
userPrompt: 'TODO: user prompt - collect per run',
152-
// skipping AAP credentials in favor of app-config.yaml
151+
// skipping AAP credentials in favor of the app-config.yaml
153152
},
154153
});
155154

0 commit comments

Comments
 (0)