mirror of
https://github.com/documize/community.git
synced 2025-08-10 07:55:25 +02:00
github repo limit 100 (up from 30)
This commit is contained in:
parent
768bedb701
commit
b246ddfb6a
1 changed files with 12 additions and 9 deletions
|
@ -22,8 +22,8 @@ import (
|
||||||
"sort"
|
"sort"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"github.com/documize/community/wordsmith/log"
|
|
||||||
"github.com/documize/community/documize/api/request"
|
"github.com/documize/community/documize/api/request"
|
||||||
|
"github.com/documize/community/wordsmith/log"
|
||||||
|
|
||||||
gogithub "github.com/google/go-github/github"
|
gogithub "github.com/google/go-github/github"
|
||||||
"golang.org/x/oauth2"
|
"golang.org/x/oauth2"
|
||||||
|
@ -31,14 +31,14 @@ import (
|
||||||
|
|
||||||
const configKey = "SECTION-GITHUB"
|
const configKey = "SECTION-GITHUB"
|
||||||
|
|
||||||
func clientID() string{
|
func clientID() string {
|
||||||
return request.ConfigString(configKey,"clientID")
|
return request.ConfigString(configKey, "clientID")
|
||||||
}
|
|
||||||
func clientSecret() string{
|
|
||||||
return request.ConfigString(configKey,"clientSecret")
|
|
||||||
}
|
}
|
||||||
func authorizationCallbackURL() string{
|
func clientSecret() string {
|
||||||
return request.ConfigString(configKey,"authorizationCallbackURL")
|
return request.ConfigString(configKey, "clientSecret")
|
||||||
|
}
|
||||||
|
func authorizationCallbackURL() string {
|
||||||
|
return request.ConfigString(configKey, "authorizationCallbackURL")
|
||||||
}
|
}
|
||||||
|
|
||||||
type GithubT struct {
|
type GithubT struct {
|
||||||
|
@ -151,7 +151,10 @@ func (t *GithubT) Command(w http.ResponseWriter, r *http.Request) {
|
||||||
if vo == *me.Login {
|
if vo == *me.Login {
|
||||||
repos, _, err = client.Repositories.List(vo, nil)
|
repos, _, err = client.Repositories.List(vo, nil)
|
||||||
} else {
|
} else {
|
||||||
repos, _, err = client.Repositories.ListByOrg(vo, nil)
|
opt := &gogithub.RepositoryListByOrgOptions{
|
||||||
|
ListOptions: gogithub.ListOptions{PerPage: 100},
|
||||||
|
}
|
||||||
|
repos, _, err = client.Repositories.ListByOrg(vo, opt)
|
||||||
}
|
}
|
||||||
if err != nil {
|
if err != nil {
|
||||||
//fmt.Println(err)
|
//fmt.Println(err)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue