Skip to content

Commit 465edae

Browse files
authored
Use pagination options when listing GitHub App repositories to retrieve more results (100) per page (#1941)
1 parent 2ae03e4 commit 465edae

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

backend/controllers/github.go

+2-1
Original file line numberDiff line numberDiff line change
@@ -2416,7 +2416,8 @@ func (d DiggerController) GithubAppCallbackPage(c *gin.Context) {
24162416
// we get repos accessible to this installation
24172417
slog.Debug("Listing repositories for installation", "installationId", installationId64)
24182418

2419-
listRepos, _, err := client.Apps.ListRepos(context.Background(), nil)
2419+
opt := &github.ListOptions{Page: 1, PerPage: 100}
2420+
listRepos, _, err := client.Apps.ListRepos(context.Background(), opt)
24202421
if err != nil {
24212422
slog.Error("Failed to list existing repositories",
24222423
"installationId", installationId64,

0 commit comments

Comments
 (0)