{% extends "repo_master.html" %} {% from "_formhelper.html" import show_comment, show_pr_initial_comment, render_bootstrap_field %} {% from "_repo_renderdiff.html" import repo_renderdiff %} {% block title %} {%- if pull_request -%} PR#{{ requestid }}: {{ pull_request.title | noJS(ignore="img") | safe }} {%- endif %} - {{ repo.url_path }} {% endblock %} {% set tag = "home" %} {% block header %} {% endblock %} {% block repo %}

{% if pull_request.status == 'Open' %} #{{requestid}} {% elif pull_request.status == 'Merged' %} #{{requestid}} {% elif pull_request.status == 'Closed' %} #{{requestid}} {% endif %} {{ pull_request.title | noJS(ignore="img") | safe}} {% if g.authenticated and (g.fas_user.username == pull_request.user.username or g.repo_committer) and pull_request.status == 'Open'%} {% endif %}
{% if pull_request.status == 'Open' %} Opened {{ pull_request.date_created |humanize }} by {{ pull_request.user.user }}. Modified {{ pull_request.updated_on |humanize }} {% elif pull_request.status == 'Merged' %} Merged {{ pull_request.closed_at |humanize }} by {{ pull_request.closed_by.user }}. Opened {{ pull_request.date_created |humanize }} by {{ pull_request.user.user }}. {% elif pull_request.status == 'Closed' %} Closed {{ pull_request.closed_at |humanize }} by {{ pull_request.closed_by.user }}. Opened {{ pull_request.date_created |humanize }} by {{ pull_request.user.user }}. {% endif %}
{% if pull_request.remote_git or pull_request.project_from.is_fork %} {% if pull_request.remote_git %} {{pull_request.remote_git}} {% elif pull_request.project_from.is_fork %} {% if pull_request.project_from.namespace %} {{pull_request.project_from.namespace}}/ {% endif %} {% if pull_request.project_from.is_fork -%} {{ pull_request.project_from.user.user }}/ {%- endif -%} {{pull_request.project_from.name}} {% endif %} {% endif %} {{ pull_request.branch_from }}  into  {{ pull_request.branch }}

{% if g.authenticated and (g.fas_user.username == pull_request.user.username or g.repo_committer) and pull_request.status == 'Open'%} {% if pull_request.status == 'Open' and g.authenticated and (g.repo_committer or g.fas_user.username == pull_request.user.username) %} {% if mergeform and pull_request.remote %}
{{ mergeform.csrf_token }}
{% endif %}
{% endif %} {% if pull_request.status == 'Open' and g.authenticated and (g.repo_committer or g.fas_user.username == pull_request.user.username) %} {{ mergeform.csrf_token }} {% endif %} {% if pull_request.status == 'Open' and g.authenticated and (g.repo_committer or g.fas_user.username == pull_request.user.username) %}
{% endif %} {% endif %} {% if pull_request.status == 'Open' %} {% endif %} {% if pull_request.status == 'Closed' and g.authenticated and (g.repo_committer or g.fas_user.username == pull_request.user.username) %}
{{ mergeform.csrf_token }}
{% endif %}
{% for commit in diff_commits %} {% if pull_request.status and pull_request.project_from.is_fork %} {% set commit_link = url_for( 'ui_ns.view_commit', repo=pull_request.project_from.name, username=pull_request.project_from.user.user, namespace=repo.namespace, commitid=commit.oid.hex)%} {% set tree_link = url_for( 'ui_ns.view_tree', username=pull_request.project_from.user.user, namespace=repo.namespace, repo=repo.name, identifier=commit.hex) %} {% elif pull_request.remote %} {% set commit_link = None %} {% else %} {% set commit_link = url_for('ui_ns.view_commit', repo=repo.name, username=repo.user.user if repo.is_fork else None, namespace=repo.namespace, commitid=commit.oid.hex) %} {% set tree_link = url_for( 'ui_ns.view_tree', username=repo.user.user if repo.is_fork else None, namespace=repo.namespace, repo=repo.name, identifier=commit.hex) %} {% endif %}
{% if commit_link %} {% endif %} {{ commit.message.strip().split('\n')[0] }} {% if commit_link %} {% endif %}
{{commit.author|author2user_commits( link=url_for('ui_ns.view_commits', repo=repo.name, branchname=branchname, username=repo.user.user if repo.is_fork else None, namespace=repo.namespace, author=commit.author.email), cssclass="notblue")|safe}} • {{ commit.commit_time|humanize }}  
{% else %}

No commits found

{% endfor %}
{% if g.authenticated %}
{% endif %} {{repo_renderdiff(diff=diff, diff_commits=diff_commits, pull_request=pull_request, repo=repo, username=username, namespace=namespace)}} {% if g.authenticated %} {{ mergeform.csrf_token }}
{% endif %}
{{ show_pr_initial_comment(pull_request, repo, form, username) }}
{% if pull_request.comments %} {% for comment in pull_request.comments %} {% if comment.commit_id %} {{ show_comment(comment, comment.id, repo, username, requestid, form, PRinline=True) }} {% elif comment.notification %}
{{ comment.user.default_email | avatar(24) | safe }}
{{ comment.comment | markdown | noJS | safe }}
{{ comment.date_created | humanize }}
{% else %} {{ show_comment(comment, comment.id, repo, username, requestid, form) }} {% endif %} {% endfor %} {{ mergeform.csrf_token }} {% endif %}
{% if g.authenticated and mergeform %}
{% if g.authenticated %}
Add new comment
{% if repo.quick_replies %} {% include "quick_reply.html" %} {% endif %}
{{ mergeform.csrf_token }}
{% endif %}

Pull this pull-request locally

{% endif %}
Metadata
{% if g.authenticated and mergeform and (g.repo_user or g.fas_user.username == pull_request.user.user) %}
{% endif %}
{% if g.authenticated and mergeform and g.repo_user %}
{% endif %} {% if g.authenticated and ( g.repo_user or g.fas_user.username == pull_request.user.user) %} {% endif%} {% if g.authenticated and mergeform and (g.repo_user or g.fas_user.username == pull_request.user.user) %}
{% endif %}
{% if pull_request.flags %} {% endif %} {% if g.authenticated %}
Subscribers {{subscribers|count}}
{% if subscribers %}
{% for subscriber in subscribers %} {{ subscriber |avatar(size=30, css_class="pb-1") | safe }} {% endfor %}
{% endif %}
{% endif %}
{% if diff %}
Changes Summary {{ diff|length if diff else 0}}
{% macro changeschangedfile(filepath, added, removed, diffanchor) -%}
+{{added}} -{{removed}}
file changed
{{filepath}}
{%- endmacro %} {% macro changesrenamedfile(oldfilepath, newfilepath, added, removed, diffanchor) -%}
+{{added}} -{{removed}}
file renamed
{{oldfilepath}}
{{newfilepath}}
{%- endmacro %} {% macro changesdeletedfile(filepath, added, removed, diffanchor) -%}
-{{removed}}
file removed
{{filepath}}
{%- endmacro %} {% macro changesaddedfile(filepath, added, removed, diffanchor) -%}
+{{added}}
file added
{{ filepath | unicode }}
{%- endmacro %}
{% for patch in diff %} {% set patchstats = (patch | patch_stats) %} {%- if patchstats["status"] == 'D' -%} {{ changesdeletedfile(patchstats["new_path"], patchstats["lines_added"], patchstats["lines_removed"], loop.index) }} {%-elif patchstats["status"] == 'A' -%} {{ changesaddedfile(patchstats["new_path"], patchstats["lines_added"], patchstats["lines_removed"], loop.index) }} {%-elif patchstats["status"] == 'M' -%} {{ changeschangedfile(patchstats["new_path"], patchstats["lines_added"], patchstats["lines_removed"], loop.index) }} {%- else -%} {{changesrenamedfile(patchstats["old_path"], patchstats["new_path"], patchstats["lines_added"], patchstats["lines_removed"], loop.index) }} {%-endif-%} {% endfor %}
{% endif %}
{% endblock %} {% block jscripts %} {{ super() }} {% if repo.quick_replies %} {% endif %} {% endblock %}