We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents d272279 + 962e94b commit f28ce77Copy full SHA for f28ce77
1 file changed
src/githubHelper.ts
@@ -241,13 +241,16 @@ export class GithubHelper {
241
try {
242
await utils.sleep(this.delayInMs);
243
// get an array of GitHub labels for the new repo
244
- let result = await this.githubApi.issues.listLabelsForRepo({
245
- owner: this.githubOwner,
246
- repo: this.githubRepo,
247
- });
248
-
249
- // extract the label name and put into a new array
250
- let labels = result.data.map(x => x.name);
+ const labels = await this.githubApi.paginate(
+ this.githubApi.issues.listLabelsForRepo,
+ {
+ owner: this.githubOwner,
+ repo: this.githubRepo,
+ per_page: 100,
+ },
251
+ // extract the label name and put into a new array
252
+ response => response.data.map(label => label.name)
253
+ );
254
255
return labels;
256
} catch (err) {
0 commit comments