Made "gitlab:projectVariable:create" 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:projectVariable:create" action idempotent
|
||||
+11
-6
@@ -88,12 +88,17 @@ export const createGitlabProjectVariableAction = (options: {
|
||||
|
||||
const api = getClient({ host, integrations, token });
|
||||
|
||||
await api.ProjectVariables.create(projectId, key, value, {
|
||||
variableType: variableType as VariableType,
|
||||
protected: variableProtected,
|
||||
masked,
|
||||
raw,
|
||||
environmentScope,
|
||||
await ctx.checkpoint({
|
||||
key: `create.project.variables.${projectId}.${key}.${value}`,
|
||||
fn: async () => {
|
||||
await api.ProjectVariables.create(projectId, key, value, {
|
||||
variableType: variableType as VariableType,
|
||||
protected: variableProtected,
|
||||
masked,
|
||||
raw,
|
||||
environmentScope,
|
||||
});
|
||||
},
|
||||
});
|
||||
},
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user