{{ define "title" }} {{ .Pull.Title }} · Pull #{{ .Pull.PullId }} · {{ .RepoInfo.FullName }} · Tangled {{ end }} {{ define "mainLayout" }} {{ template "fragments/resizable" }}
{{ template "repoOwnerAndName" . }} {{ template "repoForkInfo" . }}
{{ template "repoMetadata" . }}
{{ template "repoActions" . }}

{{ .Pull.Title | description }} #{{ .Pull.PullId }}

{{ template "repo/pulls/fragments/pullState" .Pull.State }} opened by {{ template "user/fragments/picLink" (list .Pull.OwnerDid.String "size-6" (index .VouchRelationships .Pull.OwnerDid)) }} {{ resolve .Pull.OwnerDid.String }} {{ template "repo/fragments/time" .Pull.Created }} targeting {{ .Pull.TargetBranch }} {{ if .Pull.SourceBranch }} from {{ if not .Pull.IsForkBased }} {{ $repoPath := .RepoInfo.FullName }} {{ .Pull.SourceBranch }} {{ else }} fork: {{ .Pull.SourceBranch }} {{ end }} {{ end }}
{{ if .Pull.Body }} {{ .Pull.Body | markdown }} {{ else }} No description provided {{ end }}
{{ $aturi := .Pull.AtUri }} {{ template "repo/fragments/reactions" (dict "Reactions" (index .Reactions $aturi) "UserReacted" (index .UserReacted $aturi) "ThreadAt" $aturi) }}
{{ template "repo/fragments/labelPanel" (dict "RepoInfo" $.RepoInfo "Defs" $.LabelDefs "Subject" $.Pull.AtUri "State" $.Pull.Labels) }} {{ template "repo/fragments/participants" $.Pull.Participants }} {{ template "repo/fragments/backlinks" (dict "RepoInfo" $.RepoInfo "Backlinks" $.Backlinks) }} {{ template "repo/fragments/externalLinkPanel" $.Pull.AtUri }}

Commits

{{ $seeAll := false }} {{ if .IsInterdiff }} {{ $seeAll = not .ChangeId }} {{ else }} {{ $version := index .Pull.Versions .VersionId }} {{ $seeAll = and (eq .DiffParams.Base $version.Base) (eq .DiffParams.Head $version.Head) }} {{ end }}
{{ if $seeAll }}
{{ i "arrow-right" "size-4" }}
{{ end }}
{{ if .IsInterdiff }} See all changes {{ else }} See all changes {{ end }}
{{ range .Commits }} {{ $messageParts := splitN .Message "\n\n" 2 }} {{ $active := and (not $seeAll) (eq $.ActiveCommitId .Hash.String) }} {{ $toggleId := printf "commit-message-toggle-%s" .Hash }} {{ $pipeline := index $.Pipelines .Hash.String }}
{{ if $active }}
{{ i "arrow-right" "size-4" }}
{{ end }}
{{ slice .Hash.String 0 8 }} {{ if .ChangeId }} {{ slice .ChangeId 0 8 }} {{ end }} {{ if $.IsInterdiff }} {{ index $messageParts 0 }} {{ else }} {{ index $messageParts 0 }} {{ end }}
{{ if and $pipeline $pipeline.Id }}
{{ template "repo/pipelines/fragments/pipelineSymbol" (dict "Pipeline" $pipeline "ShortSummary" true) }}
{{ end }}
{{ end }}
{{ $diffUrl := "" }} {{ if not .IsInterdiff }} {{ $diffUrl = (printf "/%s/pulls/%d/diff?view=unified" .Pull.RepoDid .Pull.PullId) }} {{ $diff := .DiffParams }} {{ else if .DiffParams.Diff }} {{ $diffUrl = (printf "/%s/pulls/%d/diff?view=unified" .Pull.RepoDid .Pull.PullId) }} {{ $diff := .DiffParams.Diff }} {{ else }} {{ $diffUrl = (printf "/%s/pulls/%d/interdiff?view=unified" .Pull.RepoDid .Pull.PullId) }} {{ $diff := .DiffParams.Interdiff }} {{ end }}
+{{ i "loader-circle" "size-3 inline-flex animate-spin" }} -{{ i "loader-circle" "size-3 inline-flex animate-spin" }}
{{ if .IsInterdiff }} Interdiff v{{ .Version1 }} {{ i "arrow-right" "size-3 inline-flex" }} v{{ .Version2 }} {{ with .ChangeId }} {{ shortId . }} {{ else }} All changes {{ end }} {{ else }} Diff v{{ .VersionId }} {{ shortId .DiffParams.Base }} {{ i "arrow-right" "size-3 inline-flex" }} {{ shortId .DiffParams.Head }} {{ end }}
{{ template "repo/pulls/fragments/diffSettings" (dict "DiffUrl" $diffUrl "Unified" true) }}
{{ $isInterdiff := .IsInterdiff }} {{ $canInterdiff := gt .ActiveVersionId 0 }}
{{ template "resize-grip" (list "resize-diff-files" "diff-files" "before" "hidden peer-checked:md:flex") }}
{{ i "loader-circle" "size-4 inline-flex animate-spin" }} loading...
{{ template "resize-grip" (list "resize-discussion" "discussion" "after" "hidden peer-checked:lg:flex") }}
{{ $versions := len .Pull.Versions }} {{ $comments := .Pull.TotalComments }}
{{ template "repo/pulls/fragments/pullState" .Pull.State }}

History

{{ $versions }} version{{ if ne $versions 1 }}s{{ end }} {{ $comments }} comment{{ if ne $comments 1 }}s{{ end }} {{ i "chevron-up" "size-4" }}
{{ range .Pull.Versions }} {{ $active := eq .ID $.ActiveVersionId }}
{{ template "user/fragments/picLink" (list $.Pull.OwnerDid.String "size-8" (index $.VouchRelationships $.Pull.OwnerDid)) }}
{{ $handle := resolve $.Pull.OwnerDid.String }} {{ if eq .ID $.Pull.LatestVersionNumber }}
{{ if $.Pull.State.IsOpen }}
{{ i "loader-circle" "size-4 animate-spin" }} Checking mergeability…
{{ end }}
{{ end }}
{{ $count := len .Comments }}
{{ i "circle-plus" "size-4 z-5" }} Expand {{ $count }} comment{{ if ne $count 1 }}s{{ end }}
{{ range .Comments }} {{ template "fragments/comment/pullComment" (dict "LoggedInUser" $.LoggedInUser "Reactions" (index (asReactionMapMap $.Reactions) .FeedCommentAtUri) "UserReacted" (index (asReactionStatusMapMap $.UserReacted) .FeedCommentAtUri) "Comment" .) }} {{ end }}
{{ if gt $count 0}} {{ end }}
{{ if eq .ID $.Pull.LatestVersionNumber }} {{ block "mergeStatus" $ }} {{ end }}
{{ end }} {{ template "repo/pulls/fragments/pullActions" (dict "LoggedInUser" $.LoggedInUser "Pull" $.Pull "RepoInfo" $.RepoInfo "RoundNumber" .ID "MergeCheck" $.MergeCheck "ResubmitCheck" $.ResubmitCheck "BranchDeleteStatus" $.BranchDeleteStatus "Loading" (eq .ID $.Pull.LatestVersionNumber)) }}
{{ end }}
{{ end }}