(opts = {})
| 308 | } |
| 309 | |
| 310 | async runners(opts = {}) { |
| 311 | const { owner, repo } = ownerRepo({ uri: this.repo }); |
| 312 | const { paginate, actions } = octokit(this.token, this.repo, logger); |
| 313 | |
| 314 | let runners; |
| 315 | if (typeof repo === 'undefined') { |
| 316 | runners = await paginate(actions.listSelfHostedRunnersForOrg, { |
| 317 | org: owner, |
| 318 | per_page: 100 |
| 319 | }); |
| 320 | } else { |
| 321 | runners = await paginate(actions.listSelfHostedRunnersForRepo, { |
| 322 | owner, |
| 323 | repo, |
| 324 | per_page: 100 |
| 325 | }); |
| 326 | } |
| 327 | |
| 328 | return runners.map((runner) => this.parseRunner(runner)); |
| 329 | } |
| 330 | |
| 331 | async runnerById(opts = {}) { |
| 332 | const { id } = opts; |
nothing calls this directly
no test coverage detected