mirror of
https://github.com/samsonjs/retrogit.git
synced 2026-03-25 09:25:49 +00:00
Include all repositories the user has access to, not just those that they own.
This commit is contained in:
parent
057c750f4b
commit
dc1225d12d
2 changed files with 10 additions and 3 deletions
9
TODO
9
TODO
|
|
@ -1,8 +1,13 @@
|
|||
Notes:
|
||||
- Will need to get/store timezone of user (use https://bitbucket.org/pellepim/jstimezonedetect, use it with time.Location.LoadLocation)
|
||||
- To get digests for non-user owned organizations, will need to list the organizations and their repositories
|
||||
- What about getting other repositories the user has access to?
|
||||
- Handle pagination for repository list
|
||||
- Handle pagination for commit list
|
||||
- To make a raw HTTP request with the github package:
|
||||
httpReq, _ := githubClient.NewRequest("GET", "user/teams", nil)
|
||||
var jsonResp interface{}
|
||||
githubClient.Do(httpReq, &jsonResp)
|
||||
log.Printf("response'%s'", jsonResp)
|
||||
|
||||
Later
|
||||
- Option to only do this for public repos (repo vs. public_repo scopes)
|
||||
|
||||
|
|
|
|||
|
|
@ -96,7 +96,9 @@ func indexHandler(w http.ResponseWriter, r *http.Request) {
|
|||
digestStartTime := time.Date(now.Year()-1, now.Month(), now.Day(), 0, 0, 0, 0, now.Location())
|
||||
digestEndTime := digestStartTime.AddDate(0, 0, 7)
|
||||
|
||||
repos, _, err := githubClient.Repositories.List(*user.Login, nil)
|
||||
// The username parameter must be left blank so that we can get all of the
|
||||
// repositories the user has access to, not just ones that they own.
|
||||
repos, _, err := githubClient.Repositories.List("", nil)
|
||||
if err != nil {
|
||||
http.Error(w, err.Error(), http.StatusInternalServerError)
|
||||
return
|
||||
|
|
|
|||
Loading…
Reference in a new issue