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

Method runnerToken

src/drivers/gitlab.js:145–162  ·  view source on GitHub ↗
(body)

Source from the content-addressed store, hash-verified

143 }
144
145 async runnerToken(body) {
146 const projectPath = await this.projectPath();
147 const legacyEndpoint = `/projects/${projectPath}`;
148 const endpoint = `/user/runners`;
149
150 const { id, runners_token: runnersToken } = await this.request({
151 endpoint: legacyEndpoint
152 });
153
154 if (runnersToken === null) {
155 if (!body) body = new URLSearchParams();
156 body.append('project_id', id);
157 body.append('runner_type', 'project_type');
158 return (await this.request({ endpoint, method: 'POST', body })).token;
159 }
160
161 return runnersToken;
162 }
163
164 async registerRunner(opts = {}) {
165 const { tags, name } = opts;

Callers 4

registerRunnerMethod · 0.95
github.e2e.test.jsFile · 0.45
gitlab.e2e.test.jsFile · 0.45

Calls 2

projectPathMethod · 0.95
requestMethod · 0.95

Tested by

no test coverage detected