From cf007f8006196844556e74ab5caf63a74edfb477 Mon Sep 17 00:00:00 2001 From: EnesAlili Date: Wed, 24 Aug 2016 11:40:56 +0100 Subject: [PATCH] New github design changes --- core/section/github/commits_template.go | 89 ++++++++++++---------- core/section/github/issues_template.go | 35 +++++++-- core/section/github/milestones_template.go | 68 ++++++++++------- core/section/github/summary_template.go | 35 +++++++-- 4 files changed, 148 insertions(+), 79 deletions(-) diff --git a/core/section/github/commits_template.go b/core/section/github/commits_template.go index 701b8d85..9350f9c6 100644 --- a/core/section/github/commits_template.go +++ b/core/section/github/commits_template.go @@ -12,58 +12,69 @@ package github const commitsTemplate = ` -

Contributor activity since {{.Config.Since}}{{.Config.DateMessage}}

- - - -    - - -    -    -  + +{{if .HasAuthorStats}} + +

Contributor activity since {{.Config.Since}}{{.Config.DateMessage}}

+
AuthorOpen IssuesClosed Issues#commitsBranches
+ + + + + + + + + + {{range $stats := .AuthorStats}} - - - - - - + + {{end}} +
ContributorAssigned/Closed#CommitsBranches
+
@{{$stats.Author}}
+ {{$stats.Author}}
{{$stats.Author}}{{$stats.OpenIssues}}{{$stats.ClosedIssues}}{{$stats.CommitCount}} + {{$stats.OpenIssues}} / {{$stats.ClosedIssues}}{{$stats.CommitCount}} {{range $repo := $stats.Repos}} {{$repo}}
{{end}}
- - {{range $commit := .BranchCommits}} - - - - - - - - {{end}} -
- {{if $commit.ShowRepo}}{{$commit.Repo}}{{end}} - - {{if $commit.ShowBranch}}{{$commit.Branch}}{{end}} - - {{if $commit.ShowDate}}{{$commit.Date}}{{end}} - - {{if $commit.ShowUser}} - @{{$commit.Name}} {{$commit.Name}} - {{end}} - - {{$commit.Message}} -
+{{end}} + +{{if .HasCommits}} +

Commits activity since {{.Config.Since}}{{.Config.DateMessage}}

+ + {{range $commit := .BranchCommits}} + + + + + + + + {{end}} +
+ {{if $commit.ShowRepo}}{{$commit.Repo}}{{end}} + + {{if $commit.ShowBranch}}{{$commit.Branch}}{{end}} + + {{if $commit.ShowDate}}{{$commit.Date}}{{end}} + + {{if $commit.ShowUser}} + @{{$commit.Name}} {{$commit.Name}} + {{end}} + + {{$commit.Message}} +
+{{end}} +
` diff --git a/core/section/github/issues_template.go b/core/section/github/issues_template.go index 2d09a5dc..071b7976 100644 --- a/core/section/github/issues_template.go +++ b/core/section/github/issues_template.go @@ -24,6 +24,7 @@ const ( ` issuesTemplate = `
+{{if .HasIssues}}

Issues: {{.ClosedIssues}} closed, {{.OpenIssues}} open

{{if .ShowList}} @@ -36,9 +37,25 @@ const ( {{end}}

+{{end}}
` ) diff --git a/core/section/github/milestones_template.go b/core/section/github/milestones_template.go index a654134a..9df9b1c3 100644 --- a/core/section/github/milestones_template.go +++ b/core/section/github/milestones_template.go @@ -13,14 +13,14 @@ package github const ( rawMSsvg = `` - openMSsvg = ` + openMSsvg = ` ` + rawMSsvg + ` ` - closedMSsvg = ` + closedMSsvg = ` ` + rawMSsvg + ` @@ -29,36 +29,50 @@ const ( ` milestonesTemplate = `
-

Milestones: {{.ClosedMS}} closed, {{.OpenMS}} open

-
-