{% extends "layout_repo.html" %} {% block page_title %}{{ pr.title }} · Pull request #{{ pr.number }} · {% endblock %} {% block content %} {% let base = r.base() %} {% let purl = r.pull_url(pr.number) %}

{{ pr.title }} #{{ pr.number }}

{% if can_close %}{% endif %}
{% if can_close %} {% endif %}
{% if pr.state == "merged" %} {{ crate::web::fmt::icon("git-merge")|safe }} Merged {{ pr.merged_by.clone().unwrap_or(pr.author.clone()) }} merged {{ crate::web::fmt::plural(data.commits.len(), "commit") }} into {{ pr.base_branch }} from {{ pr.head_branch }}{% if let Some(t) = pr.merged_at %} {% endif %} {% else if pr.state == "closed" %} {{ crate::web::fmt::icon("git-pull-request-closed")|safe }} Closed {{ pr.author }} wanted to merge {{ crate::web::fmt::plural(data.commits.len(), "commit") }} into {{ pr.base_branch }} from {{ pr.head_branch }} {% else %} {{ crate::web::fmt::icon("git-pull-request")|safe }} Open {{ pr.author }} wants to merge {{ crate::web::fmt::plural(data.commits.len(), "commit") }} into {{ pr.base_branch }} from {{ pr.head_branch }} {% endif %}
{% if pull_tab == "conversation" %}
{{ crate::web::fmt::avatar(pr.author, 40)|safe }}
{{ pr.author }} opened this Author
{% if pr.body.is_empty() %}

No description provided.

{% else %}{{ body_html|safe }}{% endif %}
{% for item in timeline %} {% let e = item.event %} {% if e.kind == "comment" %}
{{ crate::web::fmt::avatar(e.author, 40)|safe }}
{{ e.author }} commented {% if e.author == pr.author %}Author{% endif %}
{{ item.html|safe }}
{% else %}
{% if e.kind == "merged" %} {{ crate::web::fmt::icon("git-merge")|safe }} {% if e.author.is_empty() %}This pull request was merged{% else %}{{ e.author }} merged{% endif %} {% if let Some(sha) = pr.merge_commit_sha %}commit {{ crate::web::fmt::short_sha(sha) }}{% endif %} into {{ pr.base_branch }} {% else if e.kind == "closed" %} {{ crate::web::fmt::icon("git-pull-request-closed")|safe }} {{ e.author }} closed this {% else if e.kind == "reopened" %} {{ crate::web::fmt::icon("git-pull-request")|safe }} {{ e.author }} reopened this {% else if e.kind == "branch_deleted" %} {{ crate::web::fmt::icon("git-branch")|safe }} {{ e.author }} deleted the {{ e.body }} branch {% else %} {{ crate::web::fmt::icon("clock")|safe }} {{ e.kind }} {% endif %}
{% endif %} {% endfor %} {% if pr.state == "open" %}
{{ crate::web::fmt::icon("git-merge")|safe }}
{% if !data.head_exists %}
{{ crate::web::fmt::icon("git-branch")|safe }}
The head branch {{ pr.head_branch }} no longer exists.
Push the branch again or close this pull request.
{% else if !data.base_exists %}
{{ crate::web::fmt::icon("git-branch")|safe }}
The base branch {{ pr.base_branch }} no longer exists.
{% else if data.mergeability == Some(crate::git::Mergeability::Conflicts) %}
{{ crate::web::fmt::icon("x")|safe }}
This branch has conflicts that must be resolved
Resolve them locally and push the result:
git fetch origin
git checkout {{ pr.head_branch }}
git merge origin/{{ pr.base_branch }}
# fix conflicts, then
git commit
git push origin {{ pr.head_branch }}
{% else %}
{{ crate::web::fmt::icon("check")|safe }}
This branch has no conflicts with the base branch
Merging can be performed automatically.
{% if r.access.write %}
{% else %}

Only people with write access to this repository can merge pull requests.

{% endif %} {% endif %}
{% else if pr.state == "merged" %}
{{ crate::web::fmt::icon("git-merge")|safe }}
Pull request successfully merged and closed
{% if can_delete_branch %}The {{ pr.head_branch }} branch can be safely deleted.{% else %}You're all set.{% endif %}
{% if can_delete_branch %}
{% endif %}
{% else %}
{{ crate::web::fmt::icon("git-pull-request-closed")|safe }}
Closed with unmerged commits
This pull request is closed, but the {{ pr.head_branch }} branch has unmerged commits.
{% if can_delete_branch %}
{% endif %}
{% endif %} {% if let Some(u) = ctx.user %}
{{ crate::web::fmt::avatar(u.username, 40)|safe }}
Add a comment
{% if pr.state == "open" && can_close %} {% endif %}
{% if pr.state == "closed" && can_close %}
{% endif %} {% else %} {% endif %}
{% else if pull_tab == "commits" %} {% if data.commits.is_empty() %}

No commits to show.

{% else %}
{% for c in data.commits %}
{{ c.summary }}
{{ crate::web::fmt::avatar(c.author_name, 18)|safe }} {{ c.author_name }} committed
{{ c.short_id }}
{{ crate::web::fmt::icon("code")|safe }}
{% endfor %}
{% endif %} {% else %} {% if let Some(diff) = data.diff %} {% let file_ref = pr.head_sha.clone().unwrap_or(crate::web::fmt::urlpath(pr.head_branch)) %} {% include "partials/diff.html" %} {% else %}

The changes for this pull request are no longer available.

{% endif %} {% endif %} {% endblock %}