Răsfoiți Sursa

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

increase github branch limit to 100
abelanger5 5 ani în urmă
părinte
comite
c3da949446
1 a modificat fișierele cu 4 adăugiri și 1 ștergeri
  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
 	}