Skip to content

fix(admin): paginate GitHub organization listing in GetGithubUserStatus - #9899

Merged
k-anshul merged 2 commits into
rilldata:mainfrom
Tyagiquamar:fix-github-org-pagination-5284
Sep 17, 2026
Merged

k-anshul merged 2 commits into
rilldata:mainfrom
Tyagiquamar:fix-github-org-pagination-5284

Conversation

@Tyagiquamar

Copy link
Copy Markdown
Contributor

Fixes #5284.

GetGithubUserStatus called Organizations.List with nil options, so only the first page (default 30 entries) of organizations was returned. Users belonging to many organizations got a truncated org list and incomplete OrganizationInstallationPermissions.

Uses a paginated listOrganizations helper (PerPage 100, follows NextPage), matching the existing pattern in fetchReposForUser/fetchReposForInstallation.

Verified in golang:1.26.5-bookworm (matches go.mod):

  • gofmt -l admin/server/ clean
  • go vet ./admin/server/ pass
  • go build ./admin/... pass
  • go test ./admin/server/ -run TestListOrganizationsPagination pass (new test, 2-page httptest mock covering both the authenticated-user and named-user routes; fails against the old single-call logic which returns only page one)
  • existing TestMirrorGitRepo still passes

@k-anshul

Copy link
Copy Markdown
Member

Thanks for the contribution @Tyagiquamar
I made some trivial go guidelines related refactor. LGTM.

@k-anshul
k-anshul merged commit 4638eac into rilldata:main Sep 17, 2026
6 of 9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Fix pagination in github List APIs where relevant

2 participants