Fix "verified" attribute assignment

Current version incorrectly parses pipeline, which leads to
un-modified event["author"]["name"], which leads to unassigned
"verified" attribute.

Usual Jenkins comment starts as:
"Patch Set 12: Verified-1\n\nBuild failed (check pipeline)."
This means, pipeline info is on line 2, not 0.
Also, removed unneeded code from projects jinja template

Change-Id: Id1143f2980a3a09ee6ab0e35342a3512525b852c
This commit is contained in:
Evgeny Antyshev 2016-01-21 09:29:25 +00:00
parent a84ae25788
commit b880656e32
2 changed files with 2 additions and 2 deletions

View File

@ -45,7 +45,7 @@ def _process_event(event):
# Find all the CIs voting in this comment
lines = comment.splitlines()
event['ci-status'] = {}
pipeline = is_jenkins_pipeline(lines[0])
pipeline = is_jenkins_pipeline(lines[2])
if pipeline is not None:
event["author"]["name"] = event["author"]["name"] + ' ' + pipeline
for line in lines:

View File

@ -49,7 +49,7 @@
{% for patch_set in patch_sets %}
{% if patch_set.verified %}
<colgroup class="verified1"></colgroup>
{% elif patch_set.verified is not none and not patch_set.verfied %}
{% elif patch_set.verified is not none %}
<colgroup class="verified-1"></colgroup>
{% else %}
<colgroup></colgroup>