{{define "content"}} {{$repo := .Data.Repo}}

{{$repo.Name}}

{{template "repotabs" (dict "Repo" $repo "Ref" .Data.Ref "Tab" "branches" "CanManage" .Data.CanManage "CommitCount" .Data.CommitCount "BranchCount" .Data.BranchCount)}}

分支 {{num .Data.BranchCount}}

{{if .Data.Branches}}
    {{range .Data.Branches}}
  • {{.Name}} {{if eq .Name $repo.DefaultBranch}}默认{{end}}
    {{.Subject}}
    {{timeago .When}} {{short .SHA}}
  • {{end}}
{{else}}

还没有分支,推送第一个提交后会自动出现。

{{end}}

标签 {{num .Data.TagCount}}

{{if .Data.Tags}}
    {{range .Data.Tags}}
  • {{.Name}}
    {{.Subject}}
    {{timeago .When}}{{short .SHA}}
  • {{end}}
{{else}}

还没有标签。发布版本时可以在本地执行 git tag v1.0 && git push --tags。

{{end}}
{{end}}