mirror of
https://github.com/samsonjs/retrogit.git
synced 2026-04-27 15:07:43 +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
|
User *github.User
|
||||||
TimezoneLocation *time.Location
|
TimezoneLocation *time.Location
|
||||||
IntervalDigests []*IntervalDigest
|
IntervalDigests []*IntervalDigest
|
||||||
|
CommitCount int
|
||||||
RepoErrors map[string]error
|
RepoErrors map[string]error
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -218,6 +219,7 @@ func newDigest(c appengine.Context, githubClient *github.Client, account *Accoun
|
||||||
User: user,
|
User: user,
|
||||||
TimezoneLocation: account.TimezoneLocation,
|
TimezoneLocation: account.TimezoneLocation,
|
||||||
IntervalDigests: intervalDigests,
|
IntervalDigests: intervalDigests,
|
||||||
|
CommitCount: 0,
|
||||||
RepoErrors: make(map[string]error),
|
RepoErrors: make(map[string]error),
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -283,6 +285,7 @@ func (digest *Digest) fetch(githubClient *github.Client) {
|
||||||
}
|
}
|
||||||
if len(r.repoDigest.Commits) > 0 {
|
if len(r.repoDigest.Commits) > 0 {
|
||||||
r.intervalDigest.RepoDigests = append(r.intervalDigest.RepoDigests, r.repoDigest)
|
r.intervalDigest.RepoDigests = append(r.intervalDigest.RepoDigests, r.repoDigest)
|
||||||
|
digest.CommitCount += len(r.repoDigest.Commits)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -3,16 +3,15 @@
|
||||||
<div style="{{style "digest"}}">
|
<div style="{{style "digest"}}">
|
||||||
|
|
||||||
<p style="{{style "proportional" "intro-paragraph"}}">
|
<p style="{{style "proportional" "intro-paragraph"}}">
|
||||||
GitHub activity time machine for
|
Here {{if eq .CommitCount 1}}is{{else}}are{{end}} your
|
||||||
<a href="https://github.com/{{.User.Login}}"
|
(<a href="https://github.com/{{.User.Login}}"
|
||||||
title="{{.User.Name}}"
|
style="{{style "link" "intro-paragraph.user-link"}}"
|
||||||
style="{{style "link" "intro-paragraph.user-link"}}">
|
title="{{.User.Name}}"><img src="{{.User.AvatarURL}}"
|
||||||
<img src="{{.User.AvatarURL}}"
|
|
||||||
width="20"
|
width="20"
|
||||||
height="20"
|
height="20"
|
||||||
border="0"
|
border="0"
|
||||||
style="{{style "intro-paragraph.user-avatar"}}">{{.User.Login}}
|
style="{{style "intro-paragraph.user-avatar"}}">{{.User.Login}}</a>'s)
|
||||||
</a>.
|
{{.CommitCount}} commits from years past.
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
{{range .IntervalDigests }}
|
{{range .IntervalDigests }}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue