{{define "mrs"}} {{template "layout-start" .}}

{{t "mr.title"}}

{{if .CanWrite}}

{{t "mr.create"}}

{{end}} {{template "layout-end" .}} {{end}} {{define "mr"}} {{template "layout-start" .}}

!{{.MR.Number}} {{.MR.Title}}

{{.MR.Status}} {{if .MR.Draft}}{{t "mr.draft"}}{{end}} {{range .Labels}}{{.}}{{end}} {{.MR.SourceBranch}} → {{.MR.TargetBranch}} · {{.MR.Author}}

{{t "mr.pipeline"}}

{{if .MRPipe}} {{$pipe := .MRPipe}}
#{{$pipe.ID}} {{$pipe.Label}}
{{range $pipe.Stages}}
{{t "pipe.stage"}}: {{.Name}}
{{end}}
{{else}}

{{t "mr.noPipeline"}}

{{end}} {{range .MergeBlocks}}

{{.}}

{{end}} {{if .CanMerge}}
{{end}} {{if .CanClose}}
{{end}} {{if .CanReopen}}
{{end}}

{{t "rev.title"}}

{{if .CanReview}}
{{if .CanApprove}}{{end}}
{{end}}

{{t "mr.overview"}} {{t "mr.commits"}} {{t "mr.pipelines"}} {{t "mr.changes"}}

{{if .MR.Description}}
{{.DescHTML}}
{{end}} {{if .CanEditMR}}
{{t "mr.edit"}}
{{end}}

{{t "mr.timeline"}}

    {{range .Timeline}}
  1. {{if .Actor}}{{.Actor}}{{end}} {{if .URL}}{{.Text}}{{else}}{{.Text}}{{end}} {{.When}} {{if .Body}}
    {{.Body}}
    {{end}} {{if .HTML}}
    {{.HTML}}
    {{end}} {{range .Replies}}
    {{.Actor}} {{.When}}
    {{.HTML}}
    {{end}} {{if and (eq .Kind "comment") $.CanComment}}{{end}}
  2. {{end}}
{{if .CanComment}}
{{end}}

{{t "mr.commits"}}

{{t "mr.pipelines"}}

{{if .PipeRows}}
    {{range .PipeRows}}
  • #{{.ID}} {{.Label}}
  • {{end}}
{{else}}

{{t "mr.noPipeline"}}

{{end}}

{{t "mr.changes"}}

{{if .CanApply}}

{{t "sug.applyWord"}}

{{t "sug.optional"}}

{{end}}
{{if .CommitDiff}}{{if .CommitDiff.Files}}{{template "repodiff" .}}{{else}}

{{t "mr.noDiff"}}

{{end}}{{else}}

{{t "mr.noDiff"}}

{{end}} {{if .CanComment}} {{end}}
{{template "layout-end" .}} {{end}} {{define "pipenav"}}

{{t "pipe.title"}} {{t "edit.title"}}

{{end}} {{define "pipelines"}} {{template "layout-start" .}}

{{t "pipe.title"}}

{{template "pipenav" .}}
{{t "pipe.showID"}}
{{if .CanWrite}}
{{end}}
{{template "pipe-rows" .}} {{if not .PipeRows}}{{end}}
{{t "pipe.col.status"}}{{t "pipe.col.pipeline"}}{{t "pipe.col.by"}}{{t "pipe.col.stages"}}
{{t "pipe.none"}}
{{template "layout-end" .}} {{end}} {{define "pipeline"}} {{template "layout-start" .}}

{{t "pipe.one"}} #{{.Pipe.ID}}

{{template "pipenav" .}}

{{.PipeLabel}} {{.Pipe.Ref}} {{.Pipe.CommitSHA}}

{{t "pipe.runningOn" .RunnerName}}

    {{range .PipeJobs}}
  • {{.Name}} {{.Label}}{{if .Queue}} {{.Queue}}{{end}} {{.Stage}}
  • {{end}}
{{template "layout-end" .}} {{end}} {{define "pipe-rows"}} {{range .PipeRows}} {{$pipe := .}} {{.Label}}
{{.Duration}}
{{.When}}
#{{.ID}} {{if .Title}}
{{.Title}}
{{end}}
{{if .Ref}}{{.Ref}}{{end}} {{if .Short}}{{.Short}}{{end}} {{if .Actor}}{{if .Avatar}}{{else}}{{.Initial}}{{end}}{{end}}
{{if .Actor}}{{if .Avatar}}{{.Actor}}{{else}}{{.Initial}}{{end}}{{end}}
{{range .Stages}}
{{t "pipe.stage"}}: {{.Name}}
{{end}}
{{end}} {{end}} {{define "job"}} {{template "layout-start" .}}

{{with .JobPage}}{{.Name}}{{end}}

{{template "pipenav" $}} {{with .JobPage}} {{$page := .}}

{{.Label}}{{if .Queue}} {{.Queue}}{{end}} {{t "pipe.started"}} {{.When}} {{t "pipe.by"}} {{if .Avatar}}{{else if .Actor}}{{.Initial}}{{end}} {{.Actor}}

{{t "pipe.raw"}}

{{t "pipe.runningOn" $.RunnerName}}

{{t "pipe.utc"}}

{{range .Blocks}}{{if .Section}}
    {{range .Lines}}
  1. {{.N}}{{.Time}}{{range .Spans}}{{if .Class}}{{.Text}}{{else}}{{.Text}}{{end}}{{end}}
  2. {{end}}
{{else}}{{range .Lines}}
{{.N}}{{.Time}}{{range .Spans}}{{if .Class}}{{.Text}}{{else}}{{.Text}}{{end}}{{end}}
{{end}}{{end}}{{end}} {{if not .Blocks}}

{{t "pipe.emptyLog"}}

{{end}}
{{end}} {{template "layout-end" .}} {{end}} {{define "editor"}} {{template "layout-start" .}}

{{t "edit.title"}}

{{template "pipenav" .}}

{{t "edit.title"}}

{{.Editor.Status}}

{{if .Editor.Missing}}

{{t "edit.missing"}}

{{end}}
{{range .Editor.Rows}}{{.N}}{{end}}
{{range .Editor.Rows}}
{{.HTML}}
{{end}}
    {{range .Editor.Issues}}
  • {{.Line}}: {{.Text}}
  • {{end}}
{{if .CanWrite}} {{if .Editor.NeedsMR}}

{{t "edit.protectedHint"}}

{{end}} {{if .Editor.NeedsMR}}{{end}} {{range .Branches}}{{end}} {{end}}
{{template "layout-end" .}} {{end}} {{define "releases"}} {{template "layout-start" .}}

{{t "title.releases"}}

{{range .Releases}}

{{.Name}} {{.Tag}}

{{short .CommitSHA}}

{{if .Body}}
{{.Body}}
{{end}}
    {{$tag := .Tag}}{{$path := $.Repo.FullPath}} {{range .Assets}}
  • {{.Name}} {{.Size}} {{t "rel.bytes"}}
  • {{end}}
{{else}}

{{t "rel.none"}}

{{end}} {{template "layout-end" .}} {{end}} {{define "approvalform"}} {{if .Approval}} {{if .Approval.Warn}}

{{.Approval.WarnText}}

{{end}} {{if .Approval.Locked}}

{{t "appr.locked"}} {{.Approval.GroupPath}}

{{t "appr.required"}}: {{if .Approval.MaintainerRequired}}{{t "appr.on"}}{{else}}{{t "appr.off"}}{{end}}

{{t "appr.count"}}: {{.Approval.RequiredCount}}

{{t "appr.developers"}}: {{if .Approval.DevelopersApprove}}{{t "appr.on"}}{{else}}{{t "appr.off"}}{{end}}

{{else}}
{{end}} {{end}} {{end}} {{define "roleselect"}} {{end}} {{define "settings"}} {{template "layout-start" .}}

{{t "title.settings"}}

{{if not .CanAdmin}}

{{t "set.onlyAdmin" (roleName .Role)}}

{{end}} {{if .CanAdmin}}

{{t "set.general"}} {{t "set.members"}} {{t "set.branches"}} {{t "set.tags"}} {{t "set.secrets"}} {{t "set.webhooks"}} {{t "appr.tab"}}

{{if eq .Tab "members"}}
{{template "roleselect" "developer"}}
    {{range .Members}}
  • {{.Username}} · {{roleName .Role}} {{if .Pending}}{{t "set.pending"}}{{end}} {{if not .Pending}}
    {{end}}
  • {{end}}
{{else if eq .Tab "branches"}}
    {{range .Patterns}}
  • {{.}}
  • {{end}}

{{t "set.protectHint"}}

{{else if eq .Tab "tags"}}
    {{range .TagPatterns}}
  • {{.}}
  • {{end}}

{{t "set.tagHint"}}

{{else if eq .Tab "secrets"}}
    {{range .Secrets}}
  • {{.Name}} {{if .Protected}}{{t "vis.protected"}}{{end}}
  • {{end}}

{{t "set.valuesHidden"}}

{{else if eq .Tab "webhooks"}} {{template "webhookform" .}} {{else if eq .Tab "approvals"}} {{template "approvalform" .}} {{else}}

{{t "logo.hint"}}

{{t "set.delete"}}

{{end}} {{end}} {{template "layout-end" .}} {{end}} {{define "webhookform"}}
    {{range .Hooks}}
  • {{.Name}} {{presetName .Preset}} {{.Method}} {{.URL}}
    {{.Events}} {{if .Filter}}· filter {{.Filter}}{{end}}
    {{range .Deliveries}}
    {{.EventType}} → {{.StatusCode}} {{.Error}}
    {{end}}
  • {{end}}
{{end}} {{define "group"}} {{template "layout-start" .}}

{{if eq .Tab "members"}}{{t "group.tab.members"}}{{else if eq .Tab "settings"}}{{t "group.tab.settings"}}{{else}}{{.Group.Name}}{{end}}

{{if and (ne .Tab "members") (ne .Tab "settings")}}{{if .Group.Description}}

{{.Group.Description}}

{{end}}{{end}} {{if eq .Tab "members"}} {{if .CanAdmin}}
{{template "roleselect" (printf "%s" .Group.DefaultRole)}}
{{end}}
    {{range .Members}}
  • {{.Username}} · {{roleName .Role}} {{if eq .UserID $.Group.OwnerID}}{{t "group.owner"}}{{end}} {{if .Pending}}{{t "set.pending"}}{{end}} {{if and $.CanAdmin (not .Pending) (ne .UserID $.Group.OwnerID)}}
    {{end}}
  • {{end}}
{{else if eq .Tab "settings"}}

{{t "new.roleHint"}}

{{t "appr.tab"}}

{{template "approvalform" .}}

{{t "logo.hint"}}

{{t "set.secrets"}}

    {{range .Secrets}}
  • {{.Name}}
  • {{end}}

{{t "set.valuesHidden"}}

{{if .IsOwner}}

{{t "own.transfer"}}

{{if .Candidates}}

{{t "own.confirm" (index .Candidates 0).Username}}

{{else}}

{{t "own.needMember"}}

{{end}} {{end}}

{{t "set.webhooks"}}

{{t "group.secretsNote"}}

{{template "webhookform" .}} {{else}} {{if .Heat}}{{template "heatmap" .Heat}}{{end}}
{{t "group.sort"}} {{if eq .SortDir "desc"}}↓{{else}}↑{{end}}
    {{range .Cards}}
  • {{if .Repo.HasLogo}}{{else}}{{initial .Repo.Name}}{{end}} {{.Repo.Name}} {{template "visicon" .Repo.Visibility}} ★ {{.Stars}} {{t "group.created" .When}}
    ⋯
  • {{else}}
  • {{t "group.empty"}}
  • {{end}}
{{end}} {{template "layout-end" .}} {{end}}