Explorar o código

Merge pull request #529 from porter-dev/beta.3.github-branch-limit

increase github branch limit to 100
abelanger5 %!s(int64=5) %!d(string=hai) anos
pai
achega
c3da949446
Modificáronse 1 ficheiros con 4 adicións e 1 borrados
  1. 4 1
      server/api/git_repo_handler.go

+ 4 - 1
server/api/git_repo_handler.go

@@ -149,7 +149,10 @@ func (app *App) HandleGetBranches(w http.ResponseWriter, r *http.Request) {
 	client := github.NewClient(app.GithubProjectConf.Client(oauth2.NoContext, tok))
 
 	// List all branches for a specified repo
-	branches, _, err := client.Repositories.ListBranches(context.Background(), owner, name, nil)
+	branches, _, err := client.Repositories.ListBranches(context.Background(), owner, name, &github.ListOptions{
+		PerPage: 100,
+	})
+
 	if err != nil {
 		return
 	}