Explorar el Código

increase github branch limit to 100

Alexander Belanger hace 5 años
padre
commit
3e19bb6910
Se han modificado 1 ficheros con 4 adiciones y 1 borrados
  1. 4 1
      server/api/git_repo_handler.go

+ 4 - 1
server/api/git_repo_handler.go

@@ -147,7 +147,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
 	}