Made "gitlab:group:migrate" action idempotent
Signed-off-by: Bogdan Nechyporenko <bnechyporenko@bol.com>
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
---
|
||||
'@backstage/plugin-scaffolder-backend-module-gitlab': patch
|
||||
---
|
||||
|
||||
Made "gitlab:group:migrate" action idempotent
|
||||
@@ -139,10 +139,16 @@ export const createGitlabProjectMigrateAction = (options: {
|
||||
};
|
||||
|
||||
try {
|
||||
const { id: migrationId } = await api.Migrations.create(
|
||||
sourceConfig,
|
||||
migrationEntity,
|
||||
);
|
||||
const migrationId = await ctx.checkpoint({
|
||||
key: `create.migration.${sourceUrl}`,
|
||||
fn: async () => {
|
||||
const migrationStatus = await api.Migrations.create(
|
||||
sourceConfig,
|
||||
migrationEntity,
|
||||
);
|
||||
return migrationStatus.id;
|
||||
},
|
||||
});
|
||||
|
||||
ctx.output(
|
||||
'importedRepoUrl',
|
||||
|
||||
Reference in New Issue
Block a user