You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jun 16, 2025. It is now read-only.
Copy file name to clipboardExpand all lines: src/gtt-report.js
+12-8Lines changed: 12 additions & 8 deletions
Original file line number
Diff line number
Diff line change
@@ -57,7 +57,6 @@ program
57
57
.option('--user_columns', 'include user columns in the report')
58
58
.option('--quiet', 'only output report')
59
59
.option('--verbose', 'show verbose output')
60
-
.option('--check_token', 'check the access token')
61
60
.option('--show_without_times', 'show issues/merge requests without time records')
62
61
.option('-p --proxy <proxy>', 'use a proxy server with the given url')
63
62
.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)) {
78
77
if (data._dump) config.dump = data._dump;
79
78
}
80
79
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
+
81
87
// overwrite config with args and opts
82
88
config
83
89
.set('project', cli.project())
@@ -110,22 +116,21 @@ config
110
116
.set('type', program.type)
111
117
.set('subgroups', program.subgroups)
112
118
.set('_verbose', program.verbose)
113
-
.set('_checkToken', program.check_token)
114
119
.set('_createDump', program.output === 'dump');
115
120
116
121
// date shortcuts
117
-
if(program.today)
122
+
if(program.today)
118
123
config
119
124
.set('from', moment().startOf('day'))
120
125
.set('to', moment().endOf('day'));
121
-
if(program.this_week)
126
+
if(program.this_week)
122
127
config
123
128
.set('from', moment().startOf('week'))
124
129
.set('to', moment().endOf('week'));
125
-
if(program.this_month)
130
+
if(program.this_month)
126
131
config
127
132
.set('from', moment().startOf('month'))
128
-
.set('to', moment().endOf('month'));
133
+
.set('to', moment().endOf('month'));
129
134
130
135
Cli.quiet = config.get('quiet');
131
136
Cli.verbose = config.get('_verbose');
@@ -193,7 +198,7 @@ new Promise(resolve => {
193
198
reports.push(report);
194
199
report.getProject()
195
200
.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));
0 commit comments