Repos api
This commit is contained in:
+2
-2
@@ -19,8 +19,8 @@ func saveResponseMeta(token string, res *github.Response) {
|
||||
}
|
||||
tok := &db.Token{
|
||||
Token: token,
|
||||
Quota: int64(res.Limit),
|
||||
Remaining: int64(res.Remaining),
|
||||
Quota: uint64(res.Limit),
|
||||
Remaining: uint64(res.Remaining),
|
||||
ResetAt: res.Reset.Time,
|
||||
}
|
||||
tok.Save()
|
||||
|
||||
+4
-4
@@ -49,13 +49,13 @@ func SyncContrib(token, owner, repo string) {
|
||||
}
|
||||
|
||||
contrib := &db.Contrib{
|
||||
Week: week.Week.Time.Unix(),
|
||||
Week: uint64(week.Week.Time.Unix()),
|
||||
Author: *c.Author.Login,
|
||||
Owner: owner,
|
||||
Repo: repo,
|
||||
Commits: int64(*week.Commits),
|
||||
Additions: int64(*week.Additions),
|
||||
Deletions: int64(*week.Deletions),
|
||||
Commits: uint64(*week.Commits),
|
||||
Additions: uint64(*week.Additions),
|
||||
Deletions: uint64(*week.Deletions),
|
||||
}
|
||||
contrib.Save()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user