projects

showcase

A public git mirror

pulls.html 1.2 KB · 28 lines Raw
{{define "content" -}}{{template "repohead" .}}{{- if .Pulls}}<section class="box">  <h2 class="box-head">{{template "icon" "pull"}}{{len .Pulls}} pull request{{if ne (len .Pulls) 1}}s{{end}}</h2>  <ol class="rows">    {{- range .Pulls}}{{$state := .State}}{{if .Merged}}{{$state = "merged"}}{{end}}    <li class="pull" id="pr-{{.Number}}">      <details>        <summary class="row">          <span class="pr-icon pr--{{$state}}">{{template "icon" "pull"}}</span>          <div class="row-main">            <span class="row-title">{{.Title}}</span>            <span class="row-sub">#{{.Number}} opened {{day .CreatedAt}} by {{.User.Login}}{{with .Comments}} · {{.}} comment{{if ne . 1}}s{{end}}{{end}}</span>          </div>          <span class="badge badge--{{$state}}">{{$state}}</span>        </summary>        <div class="pull-body markdown">{{if .Body}}{{.Body}}{{else}}<p class="muted">No description.</p>{{end}}</div>        {{- template "thread" .}}      </details>    </li>    {{- end}}  </ol></section>{{- else}}{{template "emptystate" (dict "Icon" "pull" "Title" "No pull requests." "Hint" "This mirror is read-only. Clone the repository to work on it.")}}{{- end}}{{- end}}