feat: add pagination support when fetching repository environments#476
Open
Sylfwood wants to merge 1 commit intogithub:mainfrom
Open
feat: add pagination support when fetching repository environments#476Sylfwood wants to merge 1 commit intogithub:mainfrom
Sylfwood wants to merge 1 commit intogithub:mainfrom
Conversation
There was a problem hiding this comment.
Pull Request Overview
Adds support for fetching more than the default 30 repository environments by requesting up to 100 per page.
- Introduces a
per_page: 100parameter to the GitHub API call. - Ensures environments beyond the default 30 are included in the returned result.
Comments suppressed due to low confidence (1)
src/treeViews/settings/environmentsNode.ts:12
- Add tests for the pagination logic to ensure repositories with more than 100 environments are fully fetched.
async getEnvironments(): Promise<EnvironmentNode[]> {
There was a problem hiding this comment.
Pull Request Overview
This PR adds pagination support when fetching repository environments from GitHub so that all environments are correctly fetched instead of being limited to 30.
- Uses the GitHub API endpoint merge to configure request parameters.
- Leverages the paginate API to retrieve all environments across pages.
dion-gionet
approved these changes
Jun 12, 2025
Author
|
@ericsciple @salmanmkc Bump as it’s still an issue for us with our mono repositories. 🙏 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #278
Fetching environments was limited to 30 environments. This change use pagination to support fetching all environments.
Example:
A repository with 35 environments:

Before
Only 30 environments were fetched by the extension.

After
All 35 environments are correctly fetched.
