mirror of
https://github.com/samsonjs/retrogit.git
synced 2026-03-25 09:25:49 +00:00
Slightly better digest intro paragraph.
This commit is contained in:
parent
7e2f693fea
commit
9cb75013b1
2 changed files with 9 additions and 7 deletions
|
|
@ -167,6 +167,7 @@ type Digest struct {
|
|||
User *github.User
|
||||
TimezoneLocation *time.Location
|
||||
IntervalDigests []*IntervalDigest
|
||||
CommitCount int
|
||||
RepoErrors map[string]error
|
||||
}
|
||||
|
||||
|
|
@ -218,6 +219,7 @@ func newDigest(c appengine.Context, githubClient *github.Client, account *Accoun
|
|||
User: user,
|
||||
TimezoneLocation: account.TimezoneLocation,
|
||||
IntervalDigests: intervalDigests,
|
||||
CommitCount: 0,
|
||||
RepoErrors: make(map[string]error),
|
||||
}
|
||||
|
||||
|
|
@ -283,6 +285,7 @@ func (digest *Digest) fetch(githubClient *github.Client) {
|
|||
}
|
||||
if len(r.repoDigest.Commits) > 0 {
|
||||
r.intervalDigest.RepoDigests = append(r.intervalDigest.RepoDigests, r.repoDigest)
|
||||
digest.CommitCount += len(r.repoDigest.Commits)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,16 +3,15 @@
|
|||
<div style="{{style "digest"}}">
|
||||
|
||||
<p style="{{style "proportional" "intro-paragraph"}}">
|
||||
GitHub activity time machine for
|
||||
<a href="https://github.com/{{.User.Login}}"
|
||||
title="{{.User.Name}}"
|
||||
style="{{style "link" "intro-paragraph.user-link"}}">
|
||||
<img src="{{.User.AvatarURL}}"
|
||||
Here {{if eq .CommitCount 1}}is{{else}}are{{end}} your
|
||||
(<a href="https://github.com/{{.User.Login}}"
|
||||
style="{{style "link" "intro-paragraph.user-link"}}"
|
||||
title="{{.User.Name}}"><img src="{{.User.AvatarURL}}"
|
||||
width="20"
|
||||
height="20"
|
||||
border="0"
|
||||
style="{{style "intro-paragraph.user-avatar"}}">{{.User.Login}}
|
||||
</a>.
|
||||
style="{{style "intro-paragraph.user-avatar"}}">{{.User.Login}}</a>'s)
|
||||
{{.CommitCount}} commits from years past.
|
||||
</p>
|
||||
|
||||
{{range .IntervalDigests }}
|
||||
|
|
|
|||
Loading…
Reference in a new issue