diff --git a/lib/plugins/environments.js b/lib/plugins/environments.js index 73bef0e0f..736f1b285 100644 --- a/lib/plugins/environments.js +++ b/lib/plugins/environments.js @@ -71,11 +71,11 @@ module.exports = class Environments extends Diffable { type: policy.type })) }, - variables: (await this.github.request('GET /repos/:org/:repo/environments/:environment_name/variables', { - org: this.repo.owner, - repo: this.repo.repo, - environment_name: environment.name - })).data.variables.map(variable => ({ name: variable.name.toLowerCase(), value: variable.value })), + variables: (await this.github.paginate( + 'GET /repos/{owner}/{repo}/environments/{environment_name}/variables', + { owner: this.repo.owner, repo: this.repo.repo, environment_name: environment.name, per_page: 100 }, + (response) => response.data.variables || [] + )).map(variable => ({ name: variable.name.toLowerCase(), value: variable.value })), deployment_protection_rules: (await this.github.request('GET /repos/:org/:repo/environments/:environment_name/deployment_protection_rules', { org: this.repo.owner, repo: this.repo.repo, diff --git a/lib/plugins/variables.js b/lib/plugins/variables.js index a8e65b91e..c01084a0c 100644 --- a/lib/plugins/variables.js +++ b/lib/plugins/variables.js @@ -14,10 +14,11 @@ module.exports = class Variables extends Diffable { find () { this.log.debug(`Finding repo vars for ${this.repo.owner}/${this.repo.repo}`) - return this.github.request('GET /repos/:org/:repo/actions/variables', { - org: this.repo.owner, - repo: this.repo.repo - }).then(({ data: { variables } }) => variables.map(({ name, value }) => ({ name, value }))) + return this.github.paginate( + 'GET /repos/{owner}/{repo}/actions/variables', + { owner: this.repo.owner, repo: this.repo.repo, per_page: 100 }, + (response) => response.data.variables || [] + ).then(variables => variables.map(({ name, value }) => ({ name, value }))) } comparator (existing, attrs) {