Checking for topics before trying to add them to Project

Signed-off-by: Josh Maxwell <jmaxwell@qualtrics.com>
This commit is contained in:
Josh Maxwell
2022-10-24 23:03:35 -06:00
parent 761a8aed66
commit 840ff77576
@@ -185,7 +185,9 @@ export function createPublishGitlabAction(options: {
visibility: repoVisibility,
});
await client.Projects.edit(projectId, {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