@broadcom/endevor-bridge-for-git-for-zowe-cli
Version:
Endevor Bridge for Git plug-in for Zowe CLI
61 lines (57 loc) • 3.01 kB
JavaScript
;
var EBGSession = require('../../../sessions/EBGSession.js');
var EndevorSession = require('../../../sessions/EndevorSession.js');
var MappingOptions = require('../../../options/MappingOptions.js');
var UserOptions = require('../../../options/UserOptions.js');
/*
* Copyright (c) 2026 Broadcom. All Rights Reserved. The term
* "Broadcom" refers to Broadcom Inc. and/or its subsidiaries.
*
* This software and all information contained therein is
* confidential and proprietary and shall not be duplicated,
* used, disclosed, or disseminated in any way except as
* authorized by the applicable license agreement, without the
* express written permission of Broadcom. All authorized
* reproductions must be marked with this language.
*
* EXCEPT AS SET FORTH IN THE APPLICABLE LICENSE AGREEMENT, TO
* THE EXTENT PERMITTED BY APPLICABLE LAW, BROADCOM PROVIDES THIS
* SOFTWARE WITHOUT WARRANTY OF ANY KIND, INCLUDING WITHOUT
* LIMITATION, ANY IMPLIED WARRANTIES OF MERCHANTABILITY OR
* FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT WILL BROADCOM
* BE LIABLE TO THE END USER OR ANY THIRD PARTY FOR ANY LOSS OR
* DAMAGE, DIRECT OR INDIRECT, FROM THE USE OF THIS SOFTWARE,
* INCLUDING WITHOUT LIMITATION, LOST PROFITS, BUSINESS
* INTERRUPTION, GOODWILL, OR LOST DATA, EVEN IF BROADCOM IS
* EXPRESSLY ADVISED OF SUCH LOSS OR DAMAGE.
*
*/
const CreateEndevorUsersDefinition = {
name: "users",
aliases: ["u"],
type: "command",
handler: __dirname + "/CreateEndevorUsers.handler",
description: `Upload Mainframe users to Bridge for Git for traceability of changes from Endevor to Bridge for Git.
Before you upload mainframe users, ensure that the application.yml parameter “commit-author” is set to “ENDEVOR_USER”.`,
profile: {
optional: [EBGSession.EBGSession.PROFILE_TYPE, EndevorSession.EndevorSession.PROFILE_TYPE],
},
options: [
MappingOptions.MappingOptions.CONNECTION_NAME,
UserOptions.UserOptions.MAINFRAME_USERNAME,
UserOptions.UserOptions.GIT_USERNAME,
UserOptions.UserOptions.USER_EMAIL,
UserOptions.UserOptions.CREATE_USERS_CSV_FILE,
],
examples: [
{
description: "Upload a single mainframe user specifying both the Git and Endevor username, email, and corresponding Endevor connection",
options: `--${MappingOptions.MappingOptions.CONNECTION_NAME.name} endevor-connection-name --${UserOptions.UserOptions.MAINFRAME_USERNAME.name} ENVUSERNAME --${UserOptions.UserOptions.GIT_USERNAME.name} GITUSERNAME --${UserOptions.UserOptions.USER_EMAIL.name} NAME@EMAIL.NET`,
},
{
description: "Bulk upload new mainframe users by importing a csv format file",
options: `--${MappingOptions.MappingOptions.CONNECTION_NAME.name} endevor-connection-name --${UserOptions.UserOptions.CREATE_USERS_CSV_FILE.name} mf-users.csv`,
},
],
};
exports.CreateEndevorUsersDefinition = CreateEndevorUsersDefinition;