From b62dbe90388162065ea884e53e03af0878ce353f Mon Sep 17 00:00:00 2001 From: Julien Oculi Date: Mon, 15 Jan 2024 22:12:30 +0100 Subject: [PATCH] revert!: simplify create users by removing group option --- src/create_users.ts | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/src/create_users.ts b/src/create_users.ts index 3e0a662..11dc206 100644 --- a/src/create_users.ts +++ b/src/create_users.ts @@ -5,10 +5,7 @@ import { capitalize, log, sanitize, toLogin } from '../utils.ts' async function createUsers( redmine: Redmine, csv: CsvEntry[], - groupName: string, ) { - const userIds: number[] = [] - for (const { firstname, lastname, mail } of csv) { const login = toLogin(firstname, lastname) @@ -23,21 +20,9 @@ async function createUsers( }) log.info(`create user ${login}#${user.id}`) - userIds.push(user.id) } catch (error) { log.error(`create user ${login}`) console.error(error) } } - - try { - log.info(`add to "${groupName}" users [${userIds.join(', ')}]`) - await redmine.unstableGroups.create({ - name: 'entrepreneur-01-24', - userIds, - }) - } catch (error) { - log.error(`add to "${groupName}" users [${userIds.join(', ')}]`) - console.error(error) - } }