Procházet zdrojové kódy

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

increase github branch limit to 100
abelanger5 před 5 roky
rodič
revize
c3da949446
1 změnil soubory, kde provedl 4 přidání a 1 odebrání
  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
 	}