@@ -57,7 +57,6 @@ program
5757 . option ( '--user_columns' , 'include user columns in the report' )
5858 . option ( '--quiet' , 'only output report' )
5959 . option ( '--verbose' , 'show verbose output' )
60- . option ( '--check_token' , 'check the access token' )
6160 . option ( '--show_without_times' , 'show issues/merge requests without time records' )
6261 . option ( '-p --proxy <proxy>' , 'use a proxy server with the given url' )
6362 . option ( '--from_dump <file>' , 'instead of querying gitlab, use data from the given dump file' )
@@ -78,6 +77,13 @@ if (program.from_dump && fs.existsSync(program.from_dump)) {
7877 if ( data . _dump ) config . dump = data . _dump ;
7978}
8079
80+ // if writing a dump, set config accordingly
81+ if ( program . output === "dump" ) {
82+ config . on ( "dump-updated" , ( ) => {
83+ new Output [ 'dump' ] ( config ) ;
84+ } ) ;
85+ }
86+
8187// overwrite config with args and opts
8288config
8389 . set ( 'project' , cli . project ( ) )
@@ -110,22 +116,21 @@ config
110116 . set ( 'type' , program . type )
111117 . set ( 'subgroups' , program . subgroups )
112118 . set ( '_verbose' , program . verbose )
113- . set ( '_checkToken' , program . check_token )
114119 . set ( '_createDump' , program . output === 'dump' ) ;
115120
116121// date shortcuts
117- if ( program . today )
122+ if ( program . today )
118123 config
119124 . set ( 'from' , moment ( ) . startOf ( 'day' ) )
120125 . set ( 'to' , moment ( ) . endOf ( 'day' ) ) ;
121- if ( program . this_week )
126+ if ( program . this_week )
122127 config
123128 . set ( 'from' , moment ( ) . startOf ( 'week' ) )
124129 . set ( 'to' , moment ( ) . endOf ( 'week' ) ) ;
125- if ( program . this_month )
130+ if ( program . this_month )
126131 config
127132 . set ( 'from' , moment ( ) . startOf ( 'month' ) )
128- . set ( 'to' , moment ( ) . endOf ( 'month' ) ) ;
133+ . set ( 'to' , moment ( ) . endOf ( 'month' ) ) ;
129134
130135Cli . quiet = config . get ( 'quiet' ) ;
131136Cli . verbose = config . get ( '_verbose' ) ;
@@ -193,7 +198,7 @@ new Promise(resolve => {
193198 reports . push ( report ) ;
194199 report . getProject ( )
195200 . then ( ( ) => done ( ) )
196- . catch ( e => Cli . x ( `Project not found or no access rights "${ projectLabels } ". Run again with --check_token to see if your access token is invalid! ` , e ) ) ;
201+ . catch ( e => Cli . x ( `Project not found or no access rights "${ projectLabels } ".` , e ) ) ;
197202 break ;
198203
199204 case 'group' :
@@ -222,7 +227,6 @@ new Promise(resolve => {
222227 // get members and user columns
223228 . then ( ( ) => new Promise ( resolve => {
224229 if ( ! config . get ( 'userColumns' ) ) return resolve ( ) ;
225-
226230 reports
227231 . forEach ( ( report , done ) => {
228232 report . project . members ( )
0 commit comments