diff --git a/progit/templates/pull_request.html b/progit/templates/pull_request.html index 3f75063..d7fdb81 100644 --- a/progit/templates/pull_request.html +++ b/progit/templates/pull_request.html @@ -19,23 +19,35 @@ {% if pull_request %} -

Title: {{ pull_request.title }}

+
+

Title: {{ pull_request.title }}

+ +
{% endif %}
@@ -49,6 +61,7 @@ {% endif %} + {{ commit.oid.hex|short }} {{ commit.message.split('\n')[0] }} @@ -86,47 +99,105 @@ {% endif %}
-

Diff:

- {% for html_diff in html_diffs %} -

Commit: {{ diff_commits[loop.index - 1].oid.hex }}

+ {% for commit in diff_commits %} + {% set splitted_message = commit.message.split('\n') %} + {% set diff = diffs[loop.index - 1] %} + {% set commitid = commit.oid.hex %} - - - - - - - - - - - - - -
Author - {{ diff_commits[loop.index - 1].author.name }} - {{ '<' + diff_commits[loop.index - 1].author.email + '>' }} - - {{ diff_commits[loop.index - 1].commit_time | format_ts }} -
Committer - {{ diff_commits[loop.index - 1].committer.name }} - {{ '<' + diff_commits[loop.index - 1].committer.email + '>' }} - - {{ diff_commits[loop.index - 1].commit_time | format_ts }} -
Parent - {% for parent in diff_commits[loop.index - 1].parents %} - +
+

+ {{ splitted_message[0] }} + (commit: {{ commitid|short }} + - tree) + {% if splitted_message|length > 1 %} + + {% for message in splitted_message %} + {% if loop.index > 1 %} + {{ message }} + {% endif %} + {% endfor %} + + {% endif %} +

- {{ parent.oid.hex }} -
- {% endfor %} -
-

- {{ diff_commits[loop.index - 1].message }} -

- {% autoescape false %} - {{ html_diff | format_loc(diff_commits[loop.index - 1], pull_request, - index=loop.index) }} - {% endautoescape %} + + + + + + + + + + + + + + + + + + +
Author + {{ commit.author.name }} {{ '<' + commit.author.email + '>' }} + - {{ commit.commit_time | format_ts}} +
Committer + {{ commit.committer.name }} {{ '<' + commit.committer.email + '>' }} + - {{ commit.commit_time | format_ts }} +
Parent + {% for parent in commit.parents %} + + {{ parent.oid.hex }} +
+ {% endfor %} +
Changes +
    + {% for patch in diff %} +
  • + + + {% if patch.additions > 0 %}+{{ patch.additions }}{% endif %} + {% if patch.deletions > 0 %}-{{ patch.deletions }}{% endif %} + + + {{ patch.new_file_path }} +
  • + {% endfor %} +
+
+ +{% for patch in diff %} +
+
+

{{ patch.new_file_path }}

+
    +
  • + + {% if patch.additions > 0 %}+{{ patch.additions }}{% endif %} + {% if patch.deletions > 0 %}-{{ patch.deletions }}{% endif %} + +
  • +
  • + View +
  • +
+
+ + {% if patch.is_binary %} +

Binary diffs cannot be rendered.

+ {% else %} + {% autoescape false %} + {{ patch|patch_to_diff|html_diff|format_loc(diff_commits[loop.index - 1], pull_request, + index=loop.index)}} + {% endautoescape %} + {% endif %} +
+ +{% endfor %} {% endfor %}