MCPcopy
hub / github.com/iterative/cml / runnerToken

Method runnerToken

src/drivers/github.js:210–232  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

208 }
209
210 async runnerToken() {
211 const { owner, repo } = ownerRepo({ uri: this.repo });
212 const { actions } = octokit(this.token, this.repo, logger);
213
214 if (typeof repo !== 'undefined') {
215 const {
216 data: { token }
217 } = await actions.createRegistrationTokenForRepo({
218 owner,
219 repo
220 });
221
222 return token;
223 }
224
225 const {
226 data: { token }
227 } = await actions.createRegistrationTokenForOrg({
228 org: owner
229 });
230
231 return token;
232 }
233
234 async registerRunner() {
235 throw new Error('Github does not support registerRunner!');

Callers 1

startRunnerMethod · 0.95

Calls 2

ownerRepoFunction · 0.85
octokitFunction · 0.85

Tested by

no test coverage detected