nitlanguage
/
nit.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
faaa33b
)
github/api: return an empty list instead of crashing for issues without labels
author
Alexandre Terrasa
<alexandre@moz-code.org>
Tue, 3 Feb 2015 21:24:49 +0000
(22:24 +0100)
committer
Alexandre Terrasa
<alexandre@moz-code.org>
Tue, 3 Feb 2015 21:24:49 +0000
(22:24 +0100)
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
782d598
..
ba8943e
100644
(file)
--- a/
lib/github/api.nit
+++ b/
lib/github/api.nit
@@
-678,6
+678,7
@@
class Issue
# List of labels on this issue associated to their names.
fun labels: Map[String, Label] do
var res = new HashMap[String, Label]
+ if not json.has_key("labels") then return res
for obj in json["labels"].as(JsonArray) do
if not obj isa JsonObject then continue
var name = obj["name"].to_s