| 236 | } |
| 237 | |
| 238 | async unregisterRunner(opts) { |
| 239 | const { runnerId } = opts; |
| 240 | const { owner, repo } = ownerRepo({ uri: this.repo }); |
| 241 | const { actions } = octokit(this.token, this.repo, logger); |
| 242 | |
| 243 | if (typeof repo !== 'undefined') { |
| 244 | await actions.deleteSelfHostedRunnerFromRepo({ |
| 245 | owner, |
| 246 | repo, |
| 247 | runner_id: runnerId |
| 248 | }); |
| 249 | } else { |
| 250 | await actions.deleteSelfHostedRunnerFromOrg({ |
| 251 | org: owner, |
| 252 | runner_id: runnerId |
| 253 | }); |
| 254 | } |
| 255 | } |
| 256 | |
| 257 | async startRunner(opts) { |
| 258 | const { workdir, single, name, labels, env } = opts; |