import { Command, Option } from 'commander'; /** * Adds the ChangeMinder / change request options to a command. Each option can * also be supplied via an environment variable. CLI arguments take precedence * over environment variables. */ export function addChangeRequestOptions(command: Command): Command { return command .addOption( new Option( '--ciid ', 'Component ID for change request. Mutually exclusive with --chg-number' ).env('ALKS_CHANGE_CIID') ) .addOption( new Option( '--activity-type ', 'activity type for change request. Required with --ciid' ).env('ALKS_CHANGE_ACTIVITY_TYPE') ) .addOption( new Option( '--description ', 'description for change request. Required with --ciid' ).env('ALKS_CHANGE_DESCRIPTION') ) .addOption( new Option( '--chg-number ', 'Pre-generated change request ticket number. Mutually exclusive with --ciid' ).env('ALKS_CHANGE_NUMBER') ); }