Change added/removed/modified order, change modified symbol and added colors to
added/removed/modified
This commit is contained in:
parent
8b135d8310
commit
102d7491ef
1 changed files with 9 additions and 6 deletions
|
@ -76,14 +76,17 @@ class Module(ModuleManager.BaseModule):
|
|||
|
||||
author = "%s <%s>" % (commit["author"]["username"],
|
||||
commit["author"]["email"])
|
||||
modified_count = len(commit["modified"])
|
||||
added_count = len(commit["added"])
|
||||
removed_count = len(commit["removed"])
|
||||
url = COMMIT_URL % (full_name, id[:8])
|
||||
|
||||
outputs.append("(%s) [files: +%d ∆%d -%d] commit by '%s': %s - %s"
|
||||
% (full_name, added_count, modified_count, removed_count,
|
||||
author, message, url))
|
||||
added = utils.irc.color("+%d" % len(commit["added"]),
|
||||
utils.irc.COLOR_GREEN)
|
||||
removed = utils.irc.color("-%d" % len(commit["removed"]),
|
||||
utils.irc.COLOR_RED)
|
||||
modified = utils.irc.color("±%d" % len(commit["modified"]),
|
||||
utils.irc.COLOR_YELLOW)
|
||||
|
||||
outputs.append("(%s) [files: %s %s %s] commit by '%s': %s - %s"
|
||||
% (full_name, added, removed, modified, author, message, url))
|
||||
return outputs
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue