File tree Expand file tree Collapse file tree 3 files changed +13
-4
lines changed
Expand file tree Collapse file tree 3 files changed +13
-4
lines changed Original file line number Diff line number Diff line change 11#!/usr/bin/env node
22
3- const version = '0. 1.0' ;
3+ const version = '1.0.1 ' ;
44const program = require ( 'commander' ) ;
55
66program
Original file line number Diff line number Diff line change @@ -53,7 +53,7 @@ class report extends Base {
5353 */
5454 mergeRequests ( ) {
5555 let promise = this . all ( `projects/${ this . project . id } /merge_requests${ this . params ( ) } ` ) ;
56- promise . then ( mergeRequests => this . mergeRequests = mergeRequests ) ;
56+ promise . then ( mergeRequests => this . mergeRequests = report . filter ( mergeRequests ) ) ;
5757
5858 return promise ;
5959 }
@@ -64,11 +64,20 @@ class report extends Base {
6464 */
6565 issues ( ) {
6666 let promise = this . all ( `projects/${ this . project . id } /issues${ this . params ( ) } ` ) ;
67- promise . then ( issues => this . issues = issues ) ;
67+ promise . then ( issues => this . issues = report . filter ( issues ) ) ;
6868
6969 return promise ;
7070 }
7171
72+ /**
73+ * filter empty
74+ * @param issues
75+ * @returns {Array }
76+ */
77+ static filter ( issues ) {
78+ return issues . filter ( issue => issue . times . length > 0 ) ;
79+ }
80+
7281 /**
7382 * process the given input
7483 * @param input
Original file line number Diff line number Diff line change 11{
22 "name" : " gitlab-time-tracker" ,
3- "version" : " 1.0.0 " ,
3+ "version" : " 1.0.1 " ,
44 "description" : " A CLI that makes working with GitLabs time tracking feature more enjoyable" ,
55 "main" : " gtt.js" ,
66 "scripts" : {},
You can’t perform that action at this time.
0 commit comments