// 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 .NumContributors}}is{{else}}are{{end}} {{.NumContributors}} {{if eq 1 .NumContributors}}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}} assigned {{$stats.OpenIssues}} {{if eq 1 $stats.OpenIssues}} issue {{else}} issues {{end}} {{end}} {{if gt $stats.ClosedIssues 0}} · {{$stats.ClosedIssues}} closed {{end}} {{if gt $stats.CommitCount 0}} {{if gt $stats.OpenIssues 0}} · {{end}} {{if gt $stats.ClosedIssues 0}} · {{end}} 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 {{.NumContributors}} contributors across {{.RepoCount}} {{if eq 1 .RepoCount}} repository. {{else}} repositories. {{end}}

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