File tree 1 file changed +8
-2
lines changed
1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -51,7 +51,7 @@ const extractGraphqlJson = res => {
51
51
if ( res . errors && res . errors . length > res . data . length ) {
52
52
throw res
53
53
}
54
- return res . data . filter ( x => x !== null )
54
+ return res
55
55
} )
56
56
}
57
57
@@ -125,7 +125,13 @@ const fetchCountStats = (users) => {
125
125
}
126
126
`
127
127
128
- return githubQuery ( statsQuery ) . then ( extractGraphqlJson ) . then ( res => res . data ) . then ( res => {
128
+ return githubQuery ( statsQuery ) . then ( extractGraphqlJson ) . then ( res => Object . entries ( res . data ) . reduce ( ( obj , [ key , value ] ) => {
129
+ if ( value === null ) {
130
+
131
+ return obj
132
+ }
133
+ return { ...obj , [ key ] : value }
134
+ } , { } ) ) . then ( res => {
129
135
return Object . entries ( res ) . reduce ( ( acc , user ) => {
130
136
acc [ user [ 0 ] . replace ( / _ _ _ k e b a b _ _ _ / g, "-" ) . replace ( / _ _ N U M B E R _ _ / g, "" ) ] = extractCountStats ( user [ 1 ] )
131
137
return acc
You can’t perform that action at this time.
0 commit comments