Strip/replace \n from git commit messages in modules/github.py

This commit is contained in:
jesopo 2018-10-06 15:42:39 +01:00
parent 0794a5173a
commit 0a609ca695

View file

@ -18,7 +18,11 @@ class Module(ModuleManager.BaseModule):
for commit in data["commits"]: for commit in data["commits"]:
id = commit["id"] id = commit["id"]
message = commit["message"]
message = commit["message"].split("\n")
message = [line.strip() for line in message]
message = " ".join(message)
author = "%s <%s>" % (commit["author"]["username"], author = "%s <%s>" % (commit["author"]["username"],
commit["author"]["email"]) commit["author"]["email"])
modified_count = len(commit["modified"]) modified_count = len(commit["modified"])