File tree Expand file tree Collapse file tree 1 file changed +8
-3
lines changed
Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Original file line number Diff line number Diff line change 11import * as vscode from "vscode" ;
22import { GitHubRepoContext } from "../../git/repository" ;
33import { EnvironmentNode } from "./environmentNode" ;
4+ import { Environment } from "../../model" ;
45
56export class EnvironmentsNode extends vscode . TreeItem {
67 constructor ( public readonly gitHubRepoContext : GitHubRepoContext ) {
@@ -10,12 +11,16 @@ export class EnvironmentsNode extends vscode.TreeItem {
1011 }
1112
1213 async getEnvironments ( ) : Promise < EnvironmentNode [ ] > {
13- const result = await this . gitHubRepoContext . client . repos . getAllEnvironments ( {
14+ const opts = this . gitHubRepoContext . client . repos . getAllEnvironments . endpoint . merge ( {
1415 owner : this . gitHubRepoContext . owner ,
15- repo : this . gitHubRepoContext . name
16+ repo : this . gitHubRepoContext . name ,
17+ per_page : 100
1618 } ) ;
1719
18- const data = result . data . environments || [ ] ;
20+ // retrieve all environments
21+ const result = await this . gitHubRepoContext . client . paginate < Environment > ( opts ) ;
22+
23+ const data = result || [ ] ;
1924 return data . map ( e => new EnvironmentNode ( this . gitHubRepoContext , e ) ) ;
2025 }
2126}
You can’t perform that action at this time.
0 commit comments