1
0
Fork 0
mirror of https://github.com/documize/community.git synced 2025-07-24 23:59:47 +02:00

wrap errors up, log at top level only

This commit is contained in:
Harvey Kandola 2017-08-03 10:00:24 +01:00
parent ecc94f31c9
commit 476403bf46
28 changed files with 899 additions and 804 deletions

View file

@ -17,8 +17,6 @@ import (
"sort"
"time"
"github.com/documize/community/core/log"
gogithub "github.com/google/go-github/github"
)
@ -257,21 +255,19 @@ func getCommits(client *gogithub.Client, config *githubConfig) ([]githubCommit,
}
func refreshCommits(gr *githubRender, config *githubConfig, client *gogithub.Client) (err error) {
if !config.ShowCommits {
return nil
}
gr.BranchCommits, gr.AuthorStats, err = getCommits(client, config)
if err != nil {
log.Error("github refreshCommits:", err)
return err
}
return nil
}
func renderCommits(payload *githubRender, c *githubConfig) error {
if !c.ShowCommits {
return nil
}