From 0ea0d474f4d273b04912f66073ec9fbce585119b Mon Sep 17 00:00:00 2001 From: Josh Maxwell Date: Tue, 25 Oct 2022 08:16:44 -0600 Subject: [PATCH] Moving topics into initial project creation rather than a secondary call Signed-off-by: Josh Maxwell --- .../src/scaffolder/actions/builtin/publish/gitlab.ts | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/plugins/scaffolder-backend/src/scaffolder/actions/builtin/publish/gitlab.ts b/plugins/scaffolder-backend/src/scaffolder/actions/builtin/publish/gitlab.ts index c7a811a4d2..53669efd0b 100644 --- a/plugins/scaffolder-backend/src/scaffolder/actions/builtin/publish/gitlab.ts +++ b/plugins/scaffolder-backend/src/scaffolder/actions/builtin/publish/gitlab.ts @@ -183,12 +183,9 @@ export function createPublishGitlabAction(options: { namespace_id: targetNamespace, name: repo, visibility: repoVisibility, + ...(topics.length ? { topics } : {}), }); - if (topics.length) { - await client.Projects.edit(projectId, { topics }); - } - // When setUserAsOwner is true the input token is expected to come from an unprivileged user GitLab // OAuth flow. In this case GitLab works in a way that allows the unprivileged user to // create the repository, but not to push the default protected branch (e.g. master).