File tree Expand file tree Collapse file tree 1 file changed +41
-0
lines changed
Expand file tree Collapse file tree 1 file changed +41
-0
lines changed Original file line number Diff line number Diff line change @@ -143,6 +143,38 @@ class report extends Base {
143143 return promise ;
144144 }
145145
146+ /**
147+ * process all notes the given input
148+ * @param input
149+ * @param model
150+ * @param advance
151+ * @returns {*|Promise }
152+ */
153+ processNote ( input , model , advance = false ) {
154+ let collect = [ ] ;
155+
156+ let promise = this . parallel ( this [ input ] , ( data , done ) => {
157+
158+ let item = new model ( this . config , data ) ;
159+ item . project_namespace = this . projects [ item . project_id ] ;
160+
161+ item . getNotes ( )
162+ . then ( ( ) => {
163+ collect . push ( item ) ;
164+
165+ if ( advance ) advance ( ) ;
166+ return done ( ) ;
167+ } ) ;
168+
169+
170+ // collect items, query times & stats
171+ collect . push ( ) ;
172+ } ) ;
173+
174+ promise . then ( ( ) => this [ input ] = collect ) ;
175+ return promise ;
176+ }
177+
146178 /**
147179 * merge another report into this report
148180 * @param report
@@ -164,6 +196,15 @@ class report extends Base {
164196 return this . process ( 'issues' , Issue , advance ) ;
165197 }
166198
199+ /**
200+ * process notes
201+ * @param advance
202+ * @returns {Promise }
203+ */
204+ processNotes ( advance = false ) {
205+ return this . processNote ( 'issues' , Issue , advance ) ;
206+ }
207+
167208 /**
168209 * process merge requests
169210 * @param advance
You can’t perform that action at this time.
0 commit comments