1
0
Fork 0
mirror of https://github.com/documize/community.git synced 2025-08-07 06:25:23 +02:00

Clarify URL format, up to 100 branches & commits

This commit is contained in:
Elliott Stoneham 2016-06-02 09:00:07 +01:00
parent b246ddfb6a
commit 873509257d

View file

@ -38,6 +38,7 @@ func clientSecret() string {
return request.ConfigString(configKey, "clientSecret")
}
func authorizationCallbackURL() string {
// NOTE: URL value must have the path and query "/api/public/validate?section=github"
return request.ConfigString(configKey, "authorizationCallbackURL")
}
@ -195,7 +196,8 @@ func (t *GithubT) Command(w http.ResponseWriter, r *http.Request) {
writeJSON(w, []githubBranch{}) // we have nothing to return
return
}
branches, _, err := client.Repositories.ListBranches(config.Owner, config.Repo, nil)
branches, _, err := client.Repositories.ListBranches(config.Owner, config.Repo,
&gogithub.ListOptions{PerPage: 100})
if err != nil {
//fmt.Println(err)
// TODO log error
@ -231,7 +233,7 @@ func (*GithubT) githubClient(config githubConfig) *gogithub.Client {
func (*GithubT) getCommits(client *gogithub.Client, config githubConfig) ([]githubBranchCommits, error) {
guff, _, err := client.Repositories.ListCommits(config.Owner, config.Repo,
&gogithub.CommitsListOptions{SHA: config.Branch})
&gogithub.CommitsListOptions{SHA: config.Branch, ListOptions: gogithub.ListOptions{PerPage: 100}})
if err != nil {
return nil, err
}