nitlanguage
/
nit.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
11a2d06
)
github: Fix `GithubAPI::load_repo_branches`
author
Alexandre Terrasa
<alexandre@moz-code.org>
Wed, 19 Jun 2019 02:39:58 +0000
(22:39 -0400)
committer
Alexandre Terrasa
<alexandre@moz-code.org>
Wed, 3 Jul 2019 03:17:48 +0000
(23:17 -0400)
Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>
lib/github/api.nit
patch
|
blob
|
history
diff --git
a/lib/github/api.nit
b/lib/github/api.nit
index
4eb9a97
..
1cb3249
100644
(file)
--- a/
lib/github/api.nit
+++ b/
lib/github/api.nit
@@
-201,8
+201,12
@@
class GithubAPI
var res = new Array[Branch]
if not array isa JsonArray then return res
var deser = deserialize(array.to_json)
- if deser isa Array[Object] then return res # empty array
- return deser.as(Array[Branch])
+ if not deser isa Array[Object] then return res # empty array
+ for branch in deser do
+ if not branch isa Branch then continue
+ res.add branch
+ end
+ return res
end
# List of issues associated with their ids.