Number of Environments is limited to 30
Describe the bug When you check the Environments list in the SETTINGS tab, you can only see at most 30 environments. This affects the validation of the file as it will highlight a valid environment when it is not in the first 30 environments.
To Reproduce
- With a repository that has over 30 environments
- Go to SETTINGS --> Environments
Expected behavior It should show all the environments.
Screenshots
Extension Version
v0.26.2
Additional context
This should be fixed by the paginate method as used in this #110.
This should be fixed by the
paginatemethod as used in this #110.
Unfortunately not. https://github.com/github/vscode-github-actions/blob/02a4f12047a38409abce525e45650235499db371/src/treeViews/settings/environmentsNode.ts#L12-L16
octokit.rest.repos.getAllEnvironments() (provided by @octokit/plugin-rest-endpoint-methods npm package, v7.0.1) accepts an optional per_page parameter as well, see https://github.com/octokit/plugin-rest-endpoint-methods.js/blob/v7.0.1/docs/repos/getAllEnvironments.md.
I'm afraid there are more places need max per_page: 100 and pagination.
This should be fixed by the
paginatemethod as used in this #110.Unfortunately not.
https://github.com/github/vscode-github-actions/blob/02a4f12047a38409abce525e45650235499db371/src/treeViews/settings/environmentsNode.ts#L12-L16
octokit.rest.repos.getAllEnvironments()(provided by@octokit/plugin-rest-endpoint-methodsnpm package, v7.0.1) accepts an optionalper_pageparameter as well, see https://github.com/octokit/plugin-rest-endpoint-methods.js/blob/v7.0.1/docs/repos/getAllEnvironments.md.I'm afraid there are more places need max
per_page: 100and pagination.
I don't fully understand why not 😓. Yes, it accepts the optional per_page. But surely, you can combine the paginate method and getAllEnvironments to really get all the environments, right? Just like how it was used with listJobsForWorkflowRun.
https://github.com/github/vscode-github-actions/blob/695cfb9a9100ac0273a656c0efb566c38069ceb5/src/store/workflowRun.ts#L82-L94
This should be fixed by the
paginatemethod as used in this #110.Unfortunately not. [...]
I don't fully understand why not 😓.
I meant, unfortunately list of environments and perhaps some more lists that need an improvement on pagenating are not covered by #110.