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).