nitlanguage
/
nit.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
model: intro `MModule::first_real_mmodule` to get the first non-fictive module
[nit.git]
/
contrib
/
github_merge.nit
diff --git
a/contrib/github_merge.nit
b/contrib/github_merge.nit
index
712c1e7
..
8a2c545
100644
(file)
--- a/
contrib/github_merge.nit
+++ b/
contrib/github_merge.nit
@@
-35,7
+35,12
@@
redef class GithubCurl
var statuses = get_and_check("https://api.github.com/repos/privat/nit/statuses/{sha}")
prm["statuses"] = statuses
print "{prm["title"].to_s}: by {prm["user"].json_as_map["login"].to_s} (# {prm["number"].to_s})"
var statuses = get_and_check("https://api.github.com/repos/privat/nit/statuses/{sha}")
prm["statuses"] = statuses
print "{prm["title"].to_s}: by {prm["user"].json_as_map["login"].to_s} (# {prm["number"].to_s})"
- print "\tmergable: {prm["mergeable"].to_s}"
+ var mergeable = prm["mergeable"]
+ if mergeable != null then
+ print "\tmergeable: {mergeable.to_s}"
+ else
+ print "\tmergeable: unknown"
+ end
var st = prm["statuses"].json_as_a
if not st.is_empty then
print "\tstatus: {st[0].json_as_map["state"].to_s}"
var st = prm["statuses"].json_as_a
if not st.is_empty then
print "\tstatus: {st[0].json_as_map["state"].to_s}"
@@
-122,5
+127,6
@@
else
end
system("git commit -F mergemsg")
print "The merge is made"
end
system("git commit -F mergemsg")
print "The merge is made"
+ mergemsg.write_to(stdout)
end
end