// Copyright 2016 Documize Inc. . All rights reserved. // // This software (Documize Community Edition) is licensed under // GNU AGPL v3 http://www.gnu.org/licenses/agpl-3.0.en.html // // You can operate outside the AGPL restrictions by purchasing // Documize Enterprise Edition and obtaining a commercial license // by contacting . // // https://documize.com package github const commitsTemplate = `
{{if .HasAuthorStats}}

Contributors

There {{if eq 1 (len .AuthorStats)}}is{{else}}are{{end}} {{len .AuthorStats}} {{if eq 1 (len .AuthorStats)}}contributor{{else}}contributors{{end}} across {{.RepoCount}} {{if eq 1 .RepoCount}} repository. {{else}} repositories. {{end}}

{{range $stats := .AuthorStats}} {{end}}
@{{$stats.Author}}
{{$stats.Author}}
{{if gt $stats.OpenIssues 0}} has been assigned {{$stats.OpenIssues}} {{if eq 1 $stats.OpenIssues}} issue, {{else}} issues, {{end}} {{end}} {{if gt $stats.ClosedIssues 0}} {{$stats.ClosedIssues}} have been closed, {{end}} {{if gt $stats.CommitCount 0}} has made {{$stats.CommitCount}} {{if eq 1 $stats.CommitCount}} commit {{else}} commits {{end}} on {{len $stats.Repos}} {{if eq 1 (len $stats.Repos)}} branch. {{else}} branches. {{end}}
{{range $repo := $stats.Repos}} {{$repo}}, {{end}} {{end}}
{{end}} {{if .HasCommits}}

Commits

There are {{len .BranchCommits}} commits by {{len .AuthorStats}} contributors across {{.RepoCount}} {{if eq 1 .RepoCount}} repository. {{else}} repositories. {{end}}

{{range $commit := .BranchCommits}} {{end}}
@{{$commit.Name}} {{if $commit.ShowUser}}
{{$commit.Name}}
{{end}} {{$commit.Message}}
{{if $commit.ShowDate}}{{$commit.Date}}{{end}}
{{if $commit.ShowBranch}}{{$commit.Repo}}:{{$commit.Branch}}{{end}}
{{end}}
`