gitverse-release 3.4.0 → 3.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli.js +656 -472
- package/dist/cli.js.map +17 -24
- package/dist/index.js +648 -472
- package/dist/index.js.map +16 -23
- package/package.json +2 -2
package/dist/cli.js
CHANGED
|
@@ -148,162 +148,21 @@ function validateConfig(config) {
|
|
|
148
148
|
}
|
|
149
149
|
}
|
|
150
150
|
|
|
151
|
-
// ../sdk/dist/api/organizations.js
|
|
152
|
-
class k {
|
|
153
|
-
client;
|
|
154
|
-
constructor(b) {
|
|
155
|
-
this.client = b;
|
|
156
|
-
}
|
|
157
|
-
async checkMembership(b, h, j) {
|
|
158
|
-
try {
|
|
159
|
-
return await this.client.get(`/orgs/${b}/members/${h}`, j), true;
|
|
160
|
-
} catch (d) {
|
|
161
|
-
if (d instanceof Error && d.message.includes("404"))
|
|
162
|
-
return false;
|
|
163
|
-
throw d;
|
|
164
|
-
}
|
|
165
|
-
}
|
|
166
|
-
}
|
|
167
|
-
|
|
168
|
-
// ../sdk/dist/api/commits.js
|
|
169
|
-
class j {
|
|
170
|
-
client;
|
|
171
|
-
constructor(b) {
|
|
172
|
-
this.client = b;
|
|
173
|
-
}
|
|
174
|
-
list(b, d, f) {
|
|
175
|
-
return this.client.get(`/repos/${b}/${d}/commits`, f);
|
|
176
|
-
}
|
|
177
|
-
get(b, d, f, g) {
|
|
178
|
-
return this.client.get(`/repos/${b}/${d}/commits/${f}`, g);
|
|
179
|
-
}
|
|
180
|
-
create(b, d, f, g) {
|
|
181
|
-
return this.client.post(`/repos/${b}/${d}/git/commits`, f, g);
|
|
182
|
-
}
|
|
183
|
-
}
|
|
184
|
-
|
|
185
|
-
// ../sdk/dist/api/actions.js
|
|
186
|
-
class x {
|
|
187
|
-
client;
|
|
188
|
-
constructor(b) {
|
|
189
|
-
this.client = b;
|
|
190
|
-
}
|
|
191
|
-
listOrgRunners(b, h) {
|
|
192
|
-
return this.client.get(`/orgs/${b}/actions/runners`, h);
|
|
193
|
-
}
|
|
194
|
-
createOrgRegistrationToken(b, h) {
|
|
195
|
-
return this.client.post(`/orgs/${b}/actions/runners/registration-token`, {}, h);
|
|
196
|
-
}
|
|
197
|
-
getOrgRunner(b, h, j2) {
|
|
198
|
-
return this.client.get(`/orgs/${b}/actions/runners/${h}`, j2);
|
|
199
|
-
}
|
|
200
|
-
deleteOrgRunner(b, h, j2) {
|
|
201
|
-
return this.client.delete(`/orgs/${b}/actions/runners/${h}`, undefined, j2);
|
|
202
|
-
}
|
|
203
|
-
listRepoRunners(b, h, j2) {
|
|
204
|
-
return this.client.get(`/repos/${b}/${h}/actions/runners`, j2);
|
|
205
|
-
}
|
|
206
|
-
createRepoRegistrationToken(b, h, j2) {
|
|
207
|
-
return this.client.post(`/repos/${b}/${h}/actions/runners/registration-token`, {}, j2);
|
|
208
|
-
}
|
|
209
|
-
getRepoRunner(b, h, j2, q) {
|
|
210
|
-
return this.client.get(`/repos/${b}/${h}/actions/runners/${j2}`, q);
|
|
211
|
-
}
|
|
212
|
-
deleteRepoRunner(b, h, j2, q) {
|
|
213
|
-
return this.client.delete(`/repos/${b}/${h}/actions/runners/${j2}`, undefined, q);
|
|
214
|
-
}
|
|
215
|
-
listOrgSecrets(b, h) {
|
|
216
|
-
return this.client.get(`/orgs/${b}/actions/secrets`, h);
|
|
217
|
-
}
|
|
218
|
-
getOrgSecret(b, h, j2) {
|
|
219
|
-
return this.client.get(`/orgs/${b}/actions/secrets/${h}`, j2);
|
|
220
|
-
}
|
|
221
|
-
createOrUpdateOrgSecret(b, h, j2, q) {
|
|
222
|
-
return this.client.put(`/orgs/${b}/actions/secrets/${h}`, j2, q);
|
|
223
|
-
}
|
|
224
|
-
deleteOrgSecret(b, h, j2) {
|
|
225
|
-
return this.client.delete(`/orgs/${b}/actions/secrets/${h}`, undefined, j2);
|
|
226
|
-
}
|
|
227
|
-
listRepoSecrets(b, h, j2) {
|
|
228
|
-
return this.client.get(`/repos/${b}/${h}/actions/secrets`, j2);
|
|
229
|
-
}
|
|
230
|
-
getRepoSecret(b, h, j2, q) {
|
|
231
|
-
return this.client.get(`/repos/${b}/${h}/actions/secrets/${j2}`, q);
|
|
232
|
-
}
|
|
233
|
-
createOrUpdateRepoSecret(b, h, j2, q, v) {
|
|
234
|
-
return this.client.put(`/repos/${b}/${h}/actions/secrets/${j2}`, q, v);
|
|
235
|
-
}
|
|
236
|
-
deleteRepoSecret(b, h, j2, q) {
|
|
237
|
-
return this.client.delete(`/repos/${b}/${h}/actions/secrets/${j2}`, undefined, q);
|
|
238
|
-
}
|
|
239
|
-
listOrgVariables(b, h) {
|
|
240
|
-
return this.client.get(`/orgs/${b}/actions/variables`, h);
|
|
241
|
-
}
|
|
242
|
-
createOrgVariable(b, h, j2) {
|
|
243
|
-
return this.client.post(`/orgs/${b}/actions/variables`, h, j2);
|
|
244
|
-
}
|
|
245
|
-
getOrgVariable(b, h, j2) {
|
|
246
|
-
return this.client.get(`/orgs/${b}/actions/variables/${h}`, j2);
|
|
247
|
-
}
|
|
248
|
-
deleteOrgVariable(b, h, j2) {
|
|
249
|
-
return this.client.delete(`/orgs/${b}/actions/variables/${h}`, undefined, j2);
|
|
250
|
-
}
|
|
251
|
-
updateOrgVariable(b, h, j2, q) {
|
|
252
|
-
return this.client.patch(`/orgs/${b}/actions/variables/${h}`, j2, q);
|
|
253
|
-
}
|
|
254
|
-
listRepoVariables(b, h, j2) {
|
|
255
|
-
return this.client.get(`/repos/${b}/${h}/actions/variables`, j2);
|
|
256
|
-
}
|
|
257
|
-
createRepoVariable(b, h, j2, q) {
|
|
258
|
-
return this.client.post(`/repos/${b}/${h}/actions/variables`, j2, q);
|
|
259
|
-
}
|
|
260
|
-
getRepoVariable(b, h, j2, q) {
|
|
261
|
-
return this.client.get(`/repos/${b}/${h}/actions/variables/${j2}`, q);
|
|
262
|
-
}
|
|
263
|
-
deleteRepoVariable(b, h, j2, q) {
|
|
264
|
-
return this.client.delete(`/repos/${b}/${h}/actions/variables/${j2}`, undefined, q);
|
|
265
|
-
}
|
|
266
|
-
updateRepoVariable(b, h, j2, q, v) {
|
|
267
|
-
return this.client.patch(`/repos/${b}/${h}/actions/variables/${j2}`, q, v);
|
|
268
|
-
}
|
|
269
|
-
listArtifacts(b, h, j2) {
|
|
270
|
-
return this.client.get(`/repos/${b}/${h}/actions/artifacts`, j2);
|
|
271
|
-
}
|
|
272
|
-
getArtifact(b, h, j2, q) {
|
|
273
|
-
return this.client.get(`/repos/${b}/${h}/actions/artifacts/${j2}`, q);
|
|
274
|
-
}
|
|
275
|
-
deleteArtifact(b, h, j2, q) {
|
|
276
|
-
return this.client.delete(`/repos/${b}/${h}/actions/artifacts/${j2}`, undefined, q);
|
|
277
|
-
}
|
|
278
|
-
downloadArtifact(b, h, j2, q) {
|
|
279
|
-
return this.client.get(`/repos/${b}/${h}/actions/artifacts/${j2}/zip`, q);
|
|
280
|
-
}
|
|
281
|
-
downloadArtifactRaw(b, h, j2, q) {
|
|
282
|
-
return this.client.get(`/repos/${b}/${h}/actions/artifacts/${j2}/zip/raw`, q);
|
|
283
|
-
}
|
|
284
|
-
getWorkflowDispatchInputs(b, h, j2, q) {
|
|
285
|
-
return this.client.get(`/repos/${b}/${h}/actions/workflows/${j2}/dispatches`, q);
|
|
286
|
-
}
|
|
287
|
-
dispatchWorkflow(b, h, j2, q, v) {
|
|
288
|
-
return this.client.post(`/repos/${b}/${h}/actions/workflows/${j2}/dispatches`, q, v);
|
|
289
|
-
}
|
|
290
|
-
}
|
|
291
|
-
|
|
292
151
|
// ../sdk/dist/errors.js
|
|
293
|
-
class
|
|
152
|
+
class j extends Error {
|
|
294
153
|
status;
|
|
295
154
|
metadata;
|
|
296
155
|
constructor(b, f, h) {
|
|
297
156
|
super(f);
|
|
298
|
-
this.name = "GitVerseApiError", this.status = b, this.metadata = h, Object.setPrototypeOf(this,
|
|
157
|
+
this.name = "GitVerseApiError", this.status = b, this.metadata = h, Object.setPrototypeOf(this, j.prototype);
|
|
299
158
|
}
|
|
300
159
|
}
|
|
301
160
|
|
|
302
|
-
class
|
|
161
|
+
class k extends j {
|
|
303
162
|
rateLimit;
|
|
304
163
|
constructor(b, f, h) {
|
|
305
164
|
super(429, b, h);
|
|
306
|
-
this.name = "RateLimitError", this.rateLimit = f, Object.setPrototypeOf(this,
|
|
165
|
+
this.name = "RateLimitError", this.rateLimit = f, Object.setPrototypeOf(this, k.prototype);
|
|
307
166
|
}
|
|
308
167
|
getRetryAfterSeconds() {
|
|
309
168
|
return this.rateLimit.retryAfter;
|
|
@@ -328,411 +187,728 @@ class q {
|
|
|
328
187
|
}
|
|
329
188
|
}
|
|
330
189
|
|
|
331
|
-
// ../sdk/dist/
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
}
|
|
340
|
-
|
|
341
|
-
await this.client.put(`/user/starred/${b}/${c}`, undefined, f);
|
|
190
|
+
// ../sdk/dist/client.js
|
|
191
|
+
var Z = { DELETE: "DELETE", GET: "GET", PATCH: "PATCH", POST: "POST", PUT: "PUT" };
|
|
192
|
+
|
|
193
|
+
class v {
|
|
194
|
+
baseUrl;
|
|
195
|
+
token;
|
|
196
|
+
apiVersion;
|
|
197
|
+
onApiVersionWarning;
|
|
198
|
+
constructor(j2 = {}) {
|
|
199
|
+
this.baseUrl = j2.baseUrl || "https://api.gitverse.ru", this.token = j2.token, this.apiVersion = j2.apiVersion || "1";
|
|
342
200
|
}
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
return await this.client.get(`/user/starred/${b}/${c}`, f), true;
|
|
346
|
-
} catch (h) {
|
|
347
|
-
if (h instanceof j2 && h.status === 404)
|
|
348
|
-
return false;
|
|
349
|
-
throw h;
|
|
350
|
-
}
|
|
201
|
+
setToken(j2) {
|
|
202
|
+
this.token = j2;
|
|
351
203
|
}
|
|
352
|
-
|
|
353
|
-
|
|
204
|
+
extractRateLimitInfo(j2) {
|
|
205
|
+
let x = j2.get("GitVerse-RateLimit-Limit"), q2 = j2.get("GitVerse-RateLimit-User-Remaining") || j2.get("GitVerse-RateLimit-Remaining"), z = j2.get("GitVerse-RateLimit-Retry-After"), F = j2.get("Gitverse-Ratelimit-Reset");
|
|
206
|
+
if (!(x && z))
|
|
207
|
+
return;
|
|
208
|
+
let U = Number.parseInt(z, 10), J = F ? Number.parseInt(F, 10) : Math.floor(Date.now() / 1000) + U, K = q2 ? Number.parseInt(q2, 10) : 0;
|
|
209
|
+
return { limit: Number.parseInt(x, 10), remaining: K, reset: J, retryAfter: U };
|
|
354
210
|
}
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
constructor(c) {
|
|
361
|
-
this.client = c;
|
|
211
|
+
extractApiVersionInfo(j2) {
|
|
212
|
+
let x = j2.get("Gitverse-Api-Version"), q2 = j2.get("Gitverse-Api-Latest-Version"), z = j2.get("Gitverse-Api-Deprecation") === "true", F = j2.get("Gitverse-Api-Decommissioning");
|
|
213
|
+
if (!(x && q2))
|
|
214
|
+
return;
|
|
215
|
+
return { decommissioning: F || undefined, deprecated: z, latestVersion: q2, version: x };
|
|
362
216
|
}
|
|
363
|
-
|
|
364
|
-
let
|
|
365
|
-
if (
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
217
|
+
extractMetadata(j2) {
|
|
218
|
+
let x = this.extractRateLimitInfo(j2), q2 = this.extractApiVersionInfo(j2);
|
|
219
|
+
if (q2?.deprecated && this.onApiVersionWarning) {
|
|
220
|
+
let z = new q(q2.version, q2.latestVersion, q2.decommissioning);
|
|
221
|
+
this.onApiVersionWarning(z);
|
|
222
|
+
}
|
|
223
|
+
return { apiVersion: q2, rateLimit: x };
|
|
369
224
|
}
|
|
370
|
-
|
|
371
|
-
|
|
225
|
+
async request(j2, x, q2, z) {
|
|
226
|
+
let F = j2.startsWith("/") ? j2.slice(1) : j2, U = `${this.baseUrl}/${F}`, J = new Headers;
|
|
227
|
+
if (J.set("Content-Type", "application/json"), J.set("Accept", `application/vnd.gitverse.object+json; version=${this.apiVersion}`), this.token)
|
|
228
|
+
J.set("Authorization", `Bearer ${this.token}`);
|
|
229
|
+
let K = { body: q2 ? JSON.stringify(q2) : undefined, headers: J, method: x, signal: z?.signal }, C = await fetch(U, K), X = this.extractMetadata(C.headers), Y;
|
|
230
|
+
try {
|
|
231
|
+
Y = await C.json();
|
|
232
|
+
} catch {
|
|
233
|
+
Y = undefined;
|
|
234
|
+
}
|
|
235
|
+
if (!C.ok) {
|
|
236
|
+
let S = Y?.message || C.statusText;
|
|
237
|
+
if (C.status === 429 && X.rateLimit)
|
|
238
|
+
throw new k(S || "Превышен лимит запросов. Попробуйте позже.", X.rateLimit, X);
|
|
239
|
+
throw new j(C.status, S, X);
|
|
240
|
+
}
|
|
241
|
+
return Y;
|
|
372
242
|
}
|
|
373
|
-
|
|
374
|
-
return this.
|
|
243
|
+
get(j2, x) {
|
|
244
|
+
return this.request(j2, Z.GET, undefined, x);
|
|
375
245
|
}
|
|
376
|
-
|
|
377
|
-
return this.
|
|
246
|
+
post(j2, x, q2) {
|
|
247
|
+
return this.request(j2, Z.POST, x, q2);
|
|
378
248
|
}
|
|
379
|
-
|
|
380
|
-
return this.
|
|
249
|
+
put(j2, x, q2) {
|
|
250
|
+
return this.request(j2, Z.PUT, x, q2);
|
|
381
251
|
}
|
|
382
|
-
|
|
383
|
-
return this.
|
|
252
|
+
delete(j2, x, q2) {
|
|
253
|
+
return this.request(j2, Z.DELETE, x, q2);
|
|
384
254
|
}
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
// ../sdk/dist/api/branches.js
|
|
388
|
-
class g {
|
|
389
|
-
client;
|
|
390
|
-
constructor(b) {
|
|
391
|
-
this.client = b;
|
|
255
|
+
patch(j2, x, q2) {
|
|
256
|
+
return this.request(j2, Z.PATCH, x, q2);
|
|
392
257
|
}
|
|
393
|
-
|
|
394
|
-
|
|
258
|
+
async uploadFile(j2, x, q2, z, F) {
|
|
259
|
+
let U = j2.startsWith("/") ? j2.slice(1) : j2, J = `${this.baseUrl}/${U}`, K = new Headers;
|
|
260
|
+
if (K.set("Accept", `application/vnd.gitverse.object+json; version=${this.apiVersion}`), this.token)
|
|
261
|
+
K.set("Authorization", `Bearer ${this.token}`);
|
|
262
|
+
let C = new FormData, X = q2 instanceof ArrayBuffer ? new Blob([q2]) : q2;
|
|
263
|
+
C.append(x, X, z);
|
|
264
|
+
let Y = { body: C, headers: K, method: Z.POST, signal: F?.signal }, Q = await fetch(J, Y), S = this.extractMetadata(Q.headers), _;
|
|
265
|
+
try {
|
|
266
|
+
_ = await Q.json();
|
|
267
|
+
} catch {
|
|
268
|
+
_ = undefined;
|
|
269
|
+
}
|
|
270
|
+
if (!Q.ok) {
|
|
271
|
+
let W = _?.message || Q.statusText;
|
|
272
|
+
if (Q.status === 429 && S.rateLimit)
|
|
273
|
+
throw new k(W || "Превышен лимит запросов. Попробуйте позже.", S.rateLimit, S);
|
|
274
|
+
throw new j(Q.status, W, S);
|
|
275
|
+
}
|
|
276
|
+
return _;
|
|
395
277
|
}
|
|
396
278
|
}
|
|
397
279
|
|
|
398
|
-
// ../sdk/dist/utils.js
|
|
399
|
-
var z = /^([a-z][a-z0-9+.-]*:\/\/[^/]+)\/([a-z][a-z0-9+.-]*:\/\/.+)$/i;
|
|
400
|
-
function E(j3) {
|
|
401
|
-
if (!j3)
|
|
402
|
-
return j3;
|
|
403
|
-
let k4 = j3.match(z);
|
|
404
|
-
if (k4?.[1] && k4?.[2]) {
|
|
405
|
-
let q2 = k4[1], v = k4[2];
|
|
406
|
-
if (v.startsWith(q2))
|
|
407
|
-
return v;
|
|
408
|
-
}
|
|
409
|
-
return j3;
|
|
410
|
-
}
|
|
411
|
-
function J(j3) {
|
|
412
|
-
let k4 = ["clone_url", "html_url", "url", "git_url", "mirror_url"], q2 = { ...j3 };
|
|
413
|
-
for (let v of k4)
|
|
414
|
-
if (typeof q2[v] === "string")
|
|
415
|
-
q2[v] = E(q2[v]);
|
|
416
|
-
return q2;
|
|
417
|
-
}
|
|
418
|
-
|
|
419
280
|
// ../sdk/dist/api/repositories.js
|
|
420
|
-
class
|
|
281
|
+
class E {
|
|
421
282
|
client;
|
|
422
|
-
constructor(
|
|
423
|
-
this.client =
|
|
424
|
-
}
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
283
|
+
constructor(k2) {
|
|
284
|
+
this.client = k2;
|
|
285
|
+
}
|
|
286
|
+
get(k2, x, j2) {
|
|
287
|
+
return this.client.get(`/repos/${k2}/${x}`, j2);
|
|
288
|
+
}
|
|
289
|
+
update(k2, x, j2, v2) {
|
|
290
|
+
return this.client.patch(`/repos/${k2}/${x}`, j2, v2);
|
|
291
|
+
}
|
|
292
|
+
delete(k2, x, j2) {
|
|
293
|
+
return this.client.delete(`/repos/${k2}/${x}`, undefined, j2);
|
|
294
|
+
}
|
|
295
|
+
listRepoSecrets(k2, x, j2, v2) {
|
|
296
|
+
let z = new URLSearchParams;
|
|
297
|
+
if (j2?.per_page !== undefined)
|
|
298
|
+
z.append("per_page", j2.per_page);
|
|
299
|
+
if (j2?.page !== undefined)
|
|
300
|
+
z.append("page", j2.page);
|
|
301
|
+
let A = z.toString(), B = `/repos/${k2}/${x}/actions/secrets${A ? `?${A}` : ""}`;
|
|
302
|
+
return this.client.get(B, v2);
|
|
303
|
+
}
|
|
304
|
+
getRepoSecret(k2, x, j2, v2) {
|
|
305
|
+
return this.client.get(`/repos/${k2}/${x}/actions/secrets/${j2}`, v2);
|
|
306
|
+
}
|
|
307
|
+
createOrUpdateRepoSecret(k2, x, j2, v2, z) {
|
|
308
|
+
let A = new URLSearchParams;
|
|
309
|
+
if (v2?.encrypted_value !== undefined)
|
|
310
|
+
A.append("encrypted_value", v2.encrypted_value);
|
|
311
|
+
let B = A.toString(), D = `/repos/${k2}/${x}/actions/secrets/${j2}${B ? `?${B}` : ""}`;
|
|
312
|
+
return this.client.put(D, z);
|
|
313
|
+
}
|
|
314
|
+
deleteRepoSecret(k2, x, j2, v2) {
|
|
315
|
+
return this.client.delete(`/repos/${k2}/${x}/actions/secrets/${j2}`, undefined, v2);
|
|
316
|
+
}
|
|
317
|
+
listBranches(k2, x, j2, v2) {
|
|
318
|
+
let z = new URLSearchParams;
|
|
319
|
+
if (j2?.page !== undefined)
|
|
320
|
+
z.append("page", String(j2.page));
|
|
321
|
+
if (j2?.per_page !== undefined)
|
|
322
|
+
z.append("per_page", String(j2.per_page));
|
|
323
|
+
if (j2?.q !== undefined)
|
|
324
|
+
z.append("q", j2.q);
|
|
325
|
+
let A = z.toString(), B = `/repos/${k2}/${x}/branches${A ? `?${A}` : ""}`;
|
|
326
|
+
return this.client.get(B, v2);
|
|
327
|
+
}
|
|
328
|
+
listCollaborators(k2, x, j2, v2) {
|
|
329
|
+
let z = new URLSearchParams;
|
|
330
|
+
if (j2?.affiliation !== undefined)
|
|
331
|
+
z.append("affiliation", j2.affiliation);
|
|
332
|
+
if (j2?.permission !== undefined)
|
|
333
|
+
z.append("permission", j2.permission);
|
|
334
|
+
if (j2?.page !== undefined)
|
|
335
|
+
z.append("page", String(j2.page));
|
|
336
|
+
if (j2?.per_page !== undefined)
|
|
337
|
+
z.append("per_page", String(j2.per_page));
|
|
338
|
+
let A = z.toString(), B = `/repos/${k2}/${x}/collaborators${A ? `?${A}` : ""}`;
|
|
339
|
+
return this.client.get(B, v2);
|
|
340
|
+
}
|
|
341
|
+
addCollaborator(k2, x, j2, v2, z) {
|
|
342
|
+
return this.client.put(`/repos/${k2}/${x}/collaborators/${j2}`, v2, z);
|
|
343
|
+
}
|
|
344
|
+
listCommits(k2, x, j2, v2) {
|
|
345
|
+
let z = new URLSearchParams;
|
|
346
|
+
if (j2?.page !== undefined)
|
|
347
|
+
z.append("page", String(j2.page));
|
|
348
|
+
if (j2?.per_page !== undefined)
|
|
349
|
+
z.append("per_page", String(j2.per_page));
|
|
350
|
+
if (j2?.sha !== undefined)
|
|
351
|
+
z.append("sha", j2.sha);
|
|
352
|
+
if (j2?.path !== undefined)
|
|
353
|
+
z.append("path", j2.path);
|
|
354
|
+
if (j2?.not !== undefined)
|
|
355
|
+
z.append("not", j2.not);
|
|
356
|
+
if (j2?.author !== undefined)
|
|
357
|
+
z.append("author", j2.author);
|
|
358
|
+
if (j2?.committer !== undefined)
|
|
359
|
+
z.append("committer", j2.committer);
|
|
360
|
+
if (j2?.since !== undefined)
|
|
361
|
+
z.append("since", j2.since);
|
|
362
|
+
if (j2?.until !== undefined)
|
|
363
|
+
z.append("until", j2.until);
|
|
364
|
+
let A = z.toString(), B = `/repos/${k2}/${x}/commits${A ? `?${A}` : ""}`;
|
|
365
|
+
return this.client.get(B, v2);
|
|
366
|
+
}
|
|
367
|
+
getCommit(k2, x, j2, v2) {
|
|
368
|
+
return this.client.get(`/repos/${k2}/${x}/commits/${j2}`, v2);
|
|
369
|
+
}
|
|
370
|
+
compareCommits(k2, x, j2, v2, z) {
|
|
371
|
+
let A = new URLSearchParams;
|
|
372
|
+
if (v2?.page !== undefined)
|
|
373
|
+
A.append("page", String(v2.page));
|
|
374
|
+
if (v2?.per_page !== undefined)
|
|
375
|
+
A.append("per_page", String(v2.per_page));
|
|
376
|
+
let B = A.toString(), D = `/repos/${k2}/${x}/compare/${j2}${B ? `?${B}` : ""}`;
|
|
377
|
+
return this.client.get(D, z);
|
|
378
|
+
}
|
|
379
|
+
getContent(k2, x, j2, v2, z) {
|
|
380
|
+
let A = new URLSearchParams;
|
|
381
|
+
if (v2?.ref !== undefined)
|
|
382
|
+
A.append("ref", v2.ref);
|
|
383
|
+
if (v2?.scope !== undefined)
|
|
384
|
+
A.append("scope", v2.scope);
|
|
385
|
+
let B = A.toString(), D = `/repos/${k2}/${x}/contents/${j2}${B ? `?${B}` : ""}`;
|
|
386
|
+
return this.client.get(D, z);
|
|
387
|
+
}
|
|
388
|
+
createOrUpdateFile(k2, x, j2, v2, z) {
|
|
389
|
+
return this.client.put(`/repos/${k2}/${x}/contents/${j2}`, v2, z);
|
|
390
|
+
}
|
|
391
|
+
deleteFile(k2, x, j2, v2, z) {
|
|
392
|
+
return this.client.delete(`/repos/${k2}/${x}/contents/${j2}`, v2, z);
|
|
393
|
+
}
|
|
394
|
+
createFork(k2, x, j2, v2) {
|
|
395
|
+
return this.client.post(`/repos/${k2}/${x}/forks`, j2, v2);
|
|
396
|
+
}
|
|
397
|
+
createCommit(k2, x, j2, v2) {
|
|
398
|
+
return this.client.post(`/repos/${k2}/${x}/git/commits`, j2, v2);
|
|
399
|
+
}
|
|
400
|
+
createRef(k2, x, j2, v2) {
|
|
401
|
+
return this.client.post(`/repos/${k2}/${x}/git/refs`, j2, v2);
|
|
402
|
+
}
|
|
403
|
+
createTree(k2, x, j2, v2) {
|
|
404
|
+
return this.client.post(`/repos/${k2}/${x}/git/trees`, j2, v2);
|
|
405
|
+
}
|
|
406
|
+
getTree(k2, x, j2, v2, z) {
|
|
407
|
+
let A = new URLSearchParams;
|
|
408
|
+
if (v2?.page !== undefined)
|
|
409
|
+
A.append("page", String(v2.page));
|
|
410
|
+
if (v2?.per_page !== undefined)
|
|
411
|
+
A.append("per_page", String(v2.per_page));
|
|
412
|
+
if (v2?.recursive !== undefined)
|
|
413
|
+
A.append("recursive", String(v2.recursive));
|
|
414
|
+
let B = A.toString(), D = `/repos/${k2}/${x}/git/trees/${j2}${B ? `?${B}` : ""}`;
|
|
415
|
+
return this.client.get(D, z);
|
|
416
|
+
}
|
|
417
|
+
listLanguages(k2, x, j2) {
|
|
418
|
+
return this.client.get(`/repos/${k2}/${x}/languages`, j2);
|
|
419
|
+
}
|
|
420
|
+
listPulls(k2, x, j2, v2) {
|
|
421
|
+
let z = new URLSearchParams;
|
|
422
|
+
if (j2?.state !== undefined)
|
|
423
|
+
z.append("state", j2.state);
|
|
424
|
+
if (j2?.head !== undefined)
|
|
425
|
+
z.append("head", j2.head);
|
|
426
|
+
if (j2?.base !== undefined)
|
|
427
|
+
z.append("base", j2.base);
|
|
428
|
+
if (j2?.sort !== undefined)
|
|
429
|
+
z.append("sort", j2.sort);
|
|
430
|
+
if (j2?.direction !== undefined)
|
|
431
|
+
z.append("direction", j2.direction);
|
|
432
|
+
if (j2?.page !== undefined)
|
|
433
|
+
z.append("page", String(j2.page));
|
|
434
|
+
if (j2?.per_page !== undefined)
|
|
435
|
+
z.append("per_page", String(j2.per_page));
|
|
436
|
+
let A = z.toString(), B = `/repos/${k2}/${x}/pulls${A ? `?${A}` : ""}`;
|
|
437
|
+
return this.client.get(B, v2);
|
|
438
|
+
}
|
|
439
|
+
getPull(k2, x, j2, v2) {
|
|
440
|
+
return this.client.get(`/repos/${k2}/${x}/pulls/${j2}`, v2);
|
|
441
|
+
}
|
|
442
|
+
updatePull(k2, x, j2, v2, z) {
|
|
443
|
+
return this.client.patch(`/repos/${k2}/${x}/pulls/${j2}`, v2, z);
|
|
444
|
+
}
|
|
445
|
+
listForAuthenticatedUser(k2, x) {
|
|
446
|
+
let j2 = new URLSearchParams;
|
|
447
|
+
if (k2?.page !== undefined)
|
|
448
|
+
j2.append("page", String(k2.page));
|
|
449
|
+
if (k2?.per_page !== undefined)
|
|
450
|
+
j2.append("per_page", String(k2.per_page));
|
|
451
|
+
let v2 = j2.toString(), z = `/user/repos${v2 ? `?${v2}` : ""}`;
|
|
452
|
+
return this.client.get(z, x);
|
|
453
|
+
}
|
|
454
|
+
createForAuthenticatedUser(k2, x) {
|
|
455
|
+
return this.client.post("/user/repos", k2, x);
|
|
448
456
|
}
|
|
449
457
|
}
|
|
450
458
|
|
|
451
|
-
// ../sdk/dist/api/
|
|
452
|
-
class
|
|
459
|
+
// ../sdk/dist/api/teams.js
|
|
460
|
+
class E2 {
|
|
453
461
|
client;
|
|
454
|
-
constructor(
|
|
455
|
-
this.client =
|
|
456
|
-
}
|
|
457
|
-
list(
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
+
constructor(x) {
|
|
463
|
+
this.client = x;
|
|
464
|
+
}
|
|
465
|
+
list(x, b, j2) {
|
|
466
|
+
let B = new URLSearchParams;
|
|
467
|
+
if (b?.page !== undefined)
|
|
468
|
+
B.append("page", String(b.page));
|
|
469
|
+
if (b?.per_page !== undefined)
|
|
470
|
+
B.append("per_page", String(b.per_page));
|
|
471
|
+
let k2 = B.toString(), C = `/orgs/${x}/teams${k2 ? `?${k2}` : ""}`;
|
|
472
|
+
return this.client.get(C, j2);
|
|
473
|
+
}
|
|
474
|
+
listMembers(x, b, j2, B) {
|
|
475
|
+
let k2 = new URLSearchParams;
|
|
476
|
+
if (j2?.page !== undefined)
|
|
477
|
+
k2.append("page", String(j2.page));
|
|
478
|
+
if (j2?.per_page !== undefined)
|
|
479
|
+
k2.append("per_page", String(j2.per_page));
|
|
480
|
+
let C = k2.toString(), D = `/orgs/${x}/teams/${b}/members${C ? `?${C}` : ""}`;
|
|
481
|
+
return this.client.get(D, B);
|
|
482
|
+
}
|
|
483
|
+
updateRepo(x, b, j2, B, k2, C) {
|
|
484
|
+
return this.client.put(`/orgs/${x}/teams/${b}/repos/${j2}/${B}`, k2, C);
|
|
462
485
|
}
|
|
463
486
|
}
|
|
464
487
|
|
|
465
|
-
// ../sdk/dist/api/
|
|
466
|
-
class
|
|
488
|
+
// ../sdk/dist/api/releases.js
|
|
489
|
+
class G {
|
|
467
490
|
client;
|
|
468
|
-
constructor(
|
|
469
|
-
this.client =
|
|
470
|
-
}
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
491
|
+
constructor(k2) {
|
|
492
|
+
this.client = k2;
|
|
493
|
+
}
|
|
494
|
+
list(k2, A, b, j2) {
|
|
495
|
+
let B = new URLSearchParams;
|
|
496
|
+
if (b?.page !== undefined)
|
|
497
|
+
B.append("page", String(b.page));
|
|
498
|
+
if (b?.per_page !== undefined)
|
|
499
|
+
B.append("per_page", String(b.per_page));
|
|
500
|
+
if (b?.draft !== undefined)
|
|
501
|
+
B.append("draft", String(b.draft));
|
|
502
|
+
if (b?.pre_release !== undefined)
|
|
503
|
+
B.append("pre_release", String(b.pre_release));
|
|
504
|
+
let C = B.toString(), E3 = `/repos/${k2}/${A}/releases${C ? `?${C}` : ""}`;
|
|
505
|
+
return this.client.get(E3, j2);
|
|
506
|
+
}
|
|
507
|
+
create(k2, A, b, j2) {
|
|
508
|
+
return this.client.post(`/repos/${k2}/${A}/releases`, b, j2);
|
|
509
|
+
}
|
|
510
|
+
getByTag(k2, A, b, j2) {
|
|
511
|
+
return this.client.get(`/repos/${k2}/${A}/releases/tags/${b}`, j2);
|
|
512
|
+
}
|
|
513
|
+
deleteByTag(k2, A, b, j2) {
|
|
514
|
+
return this.client.delete(`/repos/${k2}/${A}/releases/tags/${b}`, undefined, j2);
|
|
515
|
+
}
|
|
516
|
+
get(k2, A, b, j2) {
|
|
517
|
+
return this.client.get(`/repos/${k2}/${A}/releases/${b}`, j2);
|
|
518
|
+
}
|
|
519
|
+
update(k2, A, b, j2, B) {
|
|
520
|
+
return this.client.patch(`/repos/${k2}/${A}/releases/${b}`, j2, B);
|
|
521
|
+
}
|
|
522
|
+
delete(k2, A, b, j2) {
|
|
523
|
+
return this.client.delete(`/repos/${k2}/${A}/releases/${b}`, undefined, j2);
|
|
524
|
+
}
|
|
525
|
+
listAssets(k2, A, b, j2, B) {
|
|
526
|
+
let C = new URLSearchParams;
|
|
527
|
+
if (j2?.page !== undefined)
|
|
528
|
+
C.append("page", String(j2.page));
|
|
529
|
+
if (j2?.per_page !== undefined)
|
|
530
|
+
C.append("per_page", String(j2.per_page));
|
|
531
|
+
let E3 = C.toString(), F = `/repos/${k2}/${A}/releases/${b}/assets${E3 ? `?${E3}` : ""}`;
|
|
532
|
+
return this.client.get(F, B);
|
|
533
|
+
}
|
|
534
|
+
uploadAsset(k2, A, b, j2, B) {
|
|
535
|
+
let C = new URLSearchParams;
|
|
536
|
+
if (j2?.name !== undefined)
|
|
537
|
+
C.append("name", j2.name);
|
|
538
|
+
let E3 = C.toString(), F = `/repos/${k2}/${A}/releases/${b}/assets${E3 ? `?${E3}` : ""}`;
|
|
539
|
+
return this.client.post(F, B);
|
|
540
|
+
}
|
|
541
|
+
deleteAsset(k2, A, b, j2, B) {
|
|
542
|
+
return this.client.delete(`/repos/${k2}/${A}/releases/${b}/assets/${j2}`, undefined, B);
|
|
482
543
|
}
|
|
483
544
|
}
|
|
484
545
|
|
|
485
|
-
// ../sdk/dist/api/
|
|
486
|
-
class
|
|
546
|
+
// ../sdk/dist/api/pulls.js
|
|
547
|
+
class I {
|
|
487
548
|
client;
|
|
488
|
-
constructor(
|
|
489
|
-
this.client =
|
|
490
|
-
}
|
|
491
|
-
list(b, d) {
|
|
492
|
-
return this.client.get(`/orgs/${b}/teams`, d);
|
|
493
|
-
}
|
|
494
|
-
getInvitations(b, d, f) {
|
|
495
|
-
return this.client.get(`/orgs/${b}/teams/${d}/invitations`, f);
|
|
549
|
+
constructor(k2) {
|
|
550
|
+
this.client = k2;
|
|
496
551
|
}
|
|
497
|
-
|
|
498
|
-
return this.client.
|
|
552
|
+
create(k2, v2, z, j2) {
|
|
553
|
+
return this.client.post(`/repos/${k2}/${v2}/pulls`, z, j2);
|
|
499
554
|
}
|
|
500
|
-
|
|
501
|
-
|
|
555
|
+
listCommits(k2, v2, z, j2, D) {
|
|
556
|
+
let C = new URLSearchParams;
|
|
557
|
+
if (j2?.page !== undefined)
|
|
558
|
+
C.append("page", String(j2.page));
|
|
559
|
+
if (j2?.per_page !== undefined)
|
|
560
|
+
C.append("per_page", String(j2.per_page));
|
|
561
|
+
let F = C.toString(), G2 = `/repos/${k2}/${v2}/pulls/${z}/commits${F ? `?${F}` : ""}`;
|
|
562
|
+
return this.client.get(G2, D);
|
|
502
563
|
}
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
createRef(b, d, f, g2) {
|
|
512
|
-
return this.client.post(`/repos/${b}/${d}/git/refs`, f, g2);
|
|
564
|
+
listFiles(k2, v2, z, j2, D) {
|
|
565
|
+
let C = new URLSearchParams;
|
|
566
|
+
if (j2?.page !== undefined)
|
|
567
|
+
C.append("page", String(j2.page));
|
|
568
|
+
if (j2?.per_page !== undefined)
|
|
569
|
+
C.append("per_page", String(j2.per_page));
|
|
570
|
+
let F = C.toString(), G2 = `/repos/${k2}/${v2}/pulls/${z}/files${F ? `?${F}` : ""}`;
|
|
571
|
+
return this.client.get(G2, D);
|
|
513
572
|
}
|
|
514
|
-
|
|
515
|
-
return this.client.
|
|
573
|
+
isMerged(k2, v2, z, j2) {
|
|
574
|
+
return this.client.get(`/repos/${k2}/${v2}/pulls/${z}/merge`, j2);
|
|
516
575
|
}
|
|
517
|
-
|
|
518
|
-
return this.client.
|
|
576
|
+
updateBranch(k2, v2, z, j2, D) {
|
|
577
|
+
return this.client.put(`/repos/${k2}/${v2}/pulls/${z}/update-branch`, j2, D);
|
|
519
578
|
}
|
|
520
579
|
}
|
|
521
580
|
|
|
522
|
-
// ../sdk/dist/api/
|
|
523
|
-
class
|
|
581
|
+
// ../sdk/dist/api/organizations.js
|
|
582
|
+
class F {
|
|
524
583
|
client;
|
|
525
|
-
constructor(
|
|
526
|
-
this.client =
|
|
527
|
-
}
|
|
528
|
-
list(b, f, h) {
|
|
529
|
-
return this.client.get(`/repos/${b}/${f}/releases`, h);
|
|
530
|
-
}
|
|
531
|
-
create(b, f, h, j5) {
|
|
532
|
-
return this.client.post(`/repos/${b}/${f}/releases`, h, j5);
|
|
584
|
+
constructor(w) {
|
|
585
|
+
this.client = w;
|
|
533
586
|
}
|
|
534
|
-
|
|
535
|
-
|
|
587
|
+
listOrgSecrets(w, j2, x) {
|
|
588
|
+
let A = new URLSearchParams;
|
|
589
|
+
if (j2?.per_page !== undefined)
|
|
590
|
+
A.append("per_page", j2.per_page);
|
|
591
|
+
if (j2?.page !== undefined)
|
|
592
|
+
A.append("page", j2.page);
|
|
593
|
+
let B = A.toString(), D = `/orgs/${w}/actions/secrets${B ? `?${B}` : ""}`;
|
|
594
|
+
return this.client.get(D, x);
|
|
536
595
|
}
|
|
537
|
-
|
|
538
|
-
return this.client.
|
|
596
|
+
getOrgSecret(w, j2, x) {
|
|
597
|
+
return this.client.get(`/orgs/${w}/actions/secrets/${j2}`, x);
|
|
539
598
|
}
|
|
540
|
-
|
|
541
|
-
|
|
599
|
+
createOrUpdateOrgSecret(w, j2, x, A) {
|
|
600
|
+
let B = new URLSearchParams;
|
|
601
|
+
if (x?.encrypted_value !== undefined)
|
|
602
|
+
B.append("encrypted_value", x.encrypted_value);
|
|
603
|
+
let D = B.toString(), E3 = `/orgs/${w}/actions/secrets/${j2}${D ? `?${D}` : ""}`;
|
|
604
|
+
return this.client.put(E3, A);
|
|
542
605
|
}
|
|
543
|
-
|
|
544
|
-
return this.client.delete(`/
|
|
606
|
+
deleteOrgSecret(w, j2, x) {
|
|
607
|
+
return this.client.delete(`/orgs/${w}/actions/secrets/${j2}`, undefined, x);
|
|
545
608
|
}
|
|
546
|
-
|
|
547
|
-
return this.client.
|
|
548
|
-
}
|
|
549
|
-
getAssets(b, f, h, j5) {
|
|
550
|
-
return this.client.get(`/repos/${b}/${f}/releases/${h}/assets`, j5);
|
|
551
|
-
}
|
|
552
|
-
uploadAsset(b, f, h, j5, k6) {
|
|
553
|
-
return this.client.post(`/repos/${b}/${f}/releases/${h}/assets`, j5, k6);
|
|
554
|
-
}
|
|
555
|
-
deleteAsset(b, f, h, j5, k6) {
|
|
556
|
-
return this.client.delete(`/repos/${b}/${f}/releases/${h}/assets/${j5}`, undefined, k6);
|
|
609
|
+
isMember(w, j2, x) {
|
|
610
|
+
return this.client.get(`/orgs/${w}/members/${j2}`, x);
|
|
557
611
|
}
|
|
558
612
|
}
|
|
559
613
|
|
|
560
|
-
// ../sdk/dist/api/
|
|
561
|
-
class
|
|
614
|
+
// ../sdk/dist/api/actions.js
|
|
615
|
+
class F2 {
|
|
562
616
|
client;
|
|
563
|
-
constructor(
|
|
564
|
-
this.client =
|
|
565
|
-
}
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
617
|
+
constructor(x) {
|
|
618
|
+
this.client = x;
|
|
619
|
+
}
|
|
620
|
+
listOrgRunners(x, j2, b) {
|
|
621
|
+
let z = new URLSearchParams;
|
|
622
|
+
if (j2?.page !== undefined)
|
|
623
|
+
z.append("page", String(j2.page));
|
|
624
|
+
if (j2?.per_page !== undefined)
|
|
625
|
+
z.append("per_page", String(j2.per_page));
|
|
626
|
+
let A = z.toString(), B = `/orgs/${x}/actions/runners${A ? `?${A}` : ""}`;
|
|
627
|
+
return this.client.get(B, b);
|
|
628
|
+
}
|
|
629
|
+
createOrgRunnerRegistrationToken(x, j2) {
|
|
630
|
+
return this.client.post(`/orgs/${x}/actions/runners/registration-token`, j2);
|
|
631
|
+
}
|
|
632
|
+
getOrgRunner(x, j2, b) {
|
|
633
|
+
return this.client.get(`/orgs/${x}/actions/runners/${j2}`, b);
|
|
634
|
+
}
|
|
635
|
+
deleteOrgRunner(x, j2, b) {
|
|
636
|
+
return this.client.delete(`/orgs/${x}/actions/runners/${j2}`, undefined, b);
|
|
637
|
+
}
|
|
638
|
+
listOrgVariables(x, j2, b) {
|
|
639
|
+
let z = new URLSearchParams;
|
|
640
|
+
if (j2?.per_page !== undefined)
|
|
641
|
+
z.append("per_page", String(j2.per_page));
|
|
642
|
+
if (j2?.page !== undefined)
|
|
643
|
+
z.append("page", String(j2.page));
|
|
644
|
+
let A = z.toString(), B = `/orgs/${x}/actions/variables${A ? `?${A}` : ""}`;
|
|
645
|
+
return this.client.get(B, b);
|
|
646
|
+
}
|
|
647
|
+
createOrgVariable(x, j2, b) {
|
|
648
|
+
return this.client.post(`/orgs/${x}/actions/variables`, j2, b);
|
|
649
|
+
}
|
|
650
|
+
getOrgVariable(x, j2, b) {
|
|
651
|
+
return this.client.get(`/orgs/${x}/actions/variables/${j2}`, b);
|
|
652
|
+
}
|
|
653
|
+
updateOrgVariable(x, j2, b, z) {
|
|
654
|
+
return this.client.patch(`/orgs/${x}/actions/variables/${j2}`, b, z);
|
|
655
|
+
}
|
|
656
|
+
deleteOrgVariable(x, j2, b) {
|
|
657
|
+
return this.client.delete(`/orgs/${x}/actions/variables/${j2}`, undefined, b);
|
|
658
|
+
}
|
|
659
|
+
listArtifacts(x, j2, b, z) {
|
|
660
|
+
let A = new URLSearchParams;
|
|
661
|
+
if (b?.page !== undefined)
|
|
662
|
+
A.append("page", String(b.page));
|
|
663
|
+
if (b?.per_page !== undefined)
|
|
664
|
+
A.append("per_page", String(b.per_page));
|
|
665
|
+
if (b?.name !== undefined)
|
|
666
|
+
A.append("name", b.name);
|
|
667
|
+
let B = A.toString(), C = `/repos/${x}/${j2}/actions/artifacts${B ? `?${B}` : ""}`;
|
|
668
|
+
return this.client.get(C, z);
|
|
669
|
+
}
|
|
670
|
+
getArtifact(x, j2, b, z) {
|
|
671
|
+
return this.client.get(`/repos/${x}/${j2}/actions/artifacts/${b}`, z);
|
|
672
|
+
}
|
|
673
|
+
deleteArtifact(x, j2, b, z) {
|
|
674
|
+
return this.client.delete(`/repos/${x}/${j2}/actions/artifacts/${b}`, undefined, z);
|
|
675
|
+
}
|
|
676
|
+
downloadArtifact(x, j2, b, z) {
|
|
677
|
+
return this.client.get(`/repos/${x}/${j2}/actions/artifacts/${b}/zip`, z);
|
|
678
|
+
}
|
|
679
|
+
downloadArtifactRaw(x, j2, b, z) {
|
|
680
|
+
return this.client.get(`/repos/${x}/${j2}/actions/artifacts/${b}/zip/raw`, z);
|
|
681
|
+
}
|
|
682
|
+
listRepoRunners(x, j2, b, z) {
|
|
683
|
+
let A = new URLSearchParams;
|
|
684
|
+
if (b?.page !== undefined)
|
|
685
|
+
A.append("page", String(b.page));
|
|
686
|
+
if (b?.per_page !== undefined)
|
|
687
|
+
A.append("per_page", String(b.per_page));
|
|
688
|
+
let B = A.toString(), C = `/repos/${x}/${j2}/actions/runners${B ? `?${B}` : ""}`;
|
|
689
|
+
return this.client.get(C, z);
|
|
690
|
+
}
|
|
691
|
+
createRepoRunnerRegistrationToken(x, j2, b) {
|
|
692
|
+
return this.client.post(`/repos/${x}/${j2}/actions/runners/registration-token`, b);
|
|
693
|
+
}
|
|
694
|
+
getRepoRunner(x, j2, b, z) {
|
|
695
|
+
return this.client.get(`/repos/${x}/${j2}/actions/runners/${b}`, z);
|
|
696
|
+
}
|
|
697
|
+
deleteRepoRunner(x, j2, b, z) {
|
|
698
|
+
return this.client.delete(`/repos/${x}/${j2}/actions/runners/${b}`, undefined, z);
|
|
699
|
+
}
|
|
700
|
+
listRepoVariables(x, j2, b, z) {
|
|
701
|
+
let A = new URLSearchParams;
|
|
702
|
+
if (b?.per_page !== undefined)
|
|
703
|
+
A.append("per_page", String(b.per_page));
|
|
704
|
+
if (b?.page !== undefined)
|
|
705
|
+
A.append("page", String(b.page));
|
|
706
|
+
let B = A.toString(), C = `/repos/${x}/${j2}/actions/variables${B ? `?${B}` : ""}`;
|
|
707
|
+
return this.client.get(C, z);
|
|
708
|
+
}
|
|
709
|
+
createRepoVariable(x, j2, b, z) {
|
|
710
|
+
return this.client.post(`/repos/${x}/${j2}/actions/variables`, b, z);
|
|
711
|
+
}
|
|
712
|
+
getRepoVariable(x, j2, b, z) {
|
|
713
|
+
return this.client.get(`/repos/${x}/${j2}/actions/variables/${b}`, z);
|
|
714
|
+
}
|
|
715
|
+
updateRepoVariable(x, j2, b, z, A) {
|
|
716
|
+
return this.client.patch(`/repos/${x}/${j2}/actions/variables/${b}`, z, A);
|
|
717
|
+
}
|
|
718
|
+
deleteRepoVariable(x, j2, b, z) {
|
|
719
|
+
return this.client.delete(`/repos/${x}/${j2}/actions/variables/${b}`, undefined, z);
|
|
720
|
+
}
|
|
721
|
+
getWorkflowDispatchInputs(x, j2, b, z, A) {
|
|
722
|
+
let B = new URLSearchParams;
|
|
723
|
+
if (z?.branch !== undefined)
|
|
724
|
+
B.append("branch", z.branch);
|
|
725
|
+
if (z?.tag !== undefined)
|
|
726
|
+
B.append("tag", z.tag);
|
|
727
|
+
let C = B.toString(), D = `/repos/${x}/${j2}/actions/workflows/${b}/dispatches${C ? `?${C}` : ""}`;
|
|
728
|
+
return this.client.get(D, A);
|
|
729
|
+
}
|
|
730
|
+
dispatchWorkflow(x, j2, b, z, A, B) {
|
|
731
|
+
let C = new URLSearchParams;
|
|
732
|
+
if (A?.branch !== undefined)
|
|
733
|
+
C.append("branch", A.branch);
|
|
734
|
+
if (A?.tag !== undefined)
|
|
735
|
+
C.append("tag", A.tag);
|
|
736
|
+
let D = C.toString(), E3 = `/repos/${x}/${j2}/actions/workflows/${b}/dispatches${D ? `?${D}` : ""}`;
|
|
737
|
+
return this.client.post(E3, z, B);
|
|
596
738
|
}
|
|
597
739
|
}
|
|
598
740
|
|
|
599
|
-
// ../sdk/dist/api/
|
|
600
|
-
class
|
|
741
|
+
// ../sdk/dist/api/stars.js
|
|
742
|
+
class A {
|
|
601
743
|
client;
|
|
602
744
|
constructor(b) {
|
|
603
745
|
this.client = b;
|
|
604
746
|
}
|
|
605
|
-
|
|
606
|
-
let
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
apiVersion;
|
|
618
|
-
onApiVersionWarning;
|
|
619
|
-
constructor(j5 = {}) {
|
|
620
|
-
this.baseUrl = j5.baseUrl || "https://api.gitverse.ru", this.token = j5.token, this.apiVersion = j5.apiVersion || "1";
|
|
621
|
-
}
|
|
622
|
-
setToken(j5) {
|
|
623
|
-
this.token = j5;
|
|
624
|
-
}
|
|
625
|
-
extractRateLimitInfo(j5) {
|
|
626
|
-
let x2 = j5.get("GitVerse-RateLimit-Limit"), q4 = j5.get("GitVerse-RateLimit-User-Remaining") || j5.get("GitVerse-RateLimit-Remaining"), z2 = j5.get("GitVerse-RateLimit-Retry-After"), B2 = j5.get("Gitverse-Ratelimit-Reset");
|
|
627
|
-
if (!(x2 && z2))
|
|
628
|
-
return;
|
|
629
|
-
let K = Number.parseInt(z2, 10), D = B2 ? Number.parseInt(B2, 10) : Math.floor(Date.now() / 1000) + K, U = q4 ? Number.parseInt(q4, 10) : 0;
|
|
630
|
-
return { limit: Number.parseInt(x2, 10), remaining: U, reset: D, retryAfter: K };
|
|
631
|
-
}
|
|
632
|
-
extractApiVersionInfo(j5) {
|
|
633
|
-
let x2 = j5.get("Gitverse-Api-Version"), q4 = j5.get("Gitverse-Api-Latest-Version"), z2 = j5.get("Gitverse-Api-Deprecation") === "true", B2 = j5.get("Gitverse-Api-Decommissioning");
|
|
634
|
-
if (!(x2 && q4))
|
|
635
|
-
return;
|
|
636
|
-
return { decommissioning: B2 || undefined, deprecated: z2, latestVersion: q4, version: x2 };
|
|
637
|
-
}
|
|
638
|
-
extractMetadata(j5) {
|
|
639
|
-
let x2 = this.extractRateLimitInfo(j5), q4 = this.extractApiVersionInfo(j5);
|
|
640
|
-
if (q4?.deprecated && this.onApiVersionWarning) {
|
|
641
|
-
let z2 = new q(q4.version, q4.latestVersion, q4.decommissioning);
|
|
642
|
-
this.onApiVersionWarning(z2);
|
|
643
|
-
}
|
|
644
|
-
return { apiVersion: q4, rateLimit: x2 };
|
|
645
|
-
}
|
|
646
|
-
async request(j5, x2, q4, z2) {
|
|
647
|
-
let B2 = j5.startsWith("/") ? j5.slice(1) : j5, K = `${this.baseUrl}/${B2}`, D = new Headers;
|
|
648
|
-
if (D.set("Content-Type", "application/json"), D.set("Accept", `application/vnd.gitverse.object+json; version=${this.apiVersion}`), this.token)
|
|
649
|
-
D.set("Authorization", `Bearer ${this.token}`);
|
|
650
|
-
let U = { body: q4 ? JSON.stringify(q4) : undefined, headers: D, method: x2, signal: z2?.signal }, F = await fetch(K, U), Q = this.extractMetadata(F.headers), S;
|
|
651
|
-
try {
|
|
652
|
-
S = await F.json();
|
|
653
|
-
} catch {
|
|
654
|
-
S = undefined;
|
|
655
|
-
}
|
|
656
|
-
if (!F.ok) {
|
|
657
|
-
let X = S?.message || F.statusText;
|
|
658
|
-
if (F.status === 429 && Q.rateLimit)
|
|
659
|
-
throw new k2(X || "Превышен лимит запросов. Попробуйте позже.", Q.rateLimit, Q);
|
|
660
|
-
throw new j2(F.status, X, Q);
|
|
661
|
-
}
|
|
662
|
-
return S;
|
|
663
|
-
}
|
|
664
|
-
get(j5, x2) {
|
|
665
|
-
return this.request(j5, J2.GET, undefined, x2);
|
|
747
|
+
list(b, k2) {
|
|
748
|
+
let j2 = new URLSearchParams;
|
|
749
|
+
if (b?.page !== undefined)
|
|
750
|
+
j2.append("page", String(b.page));
|
|
751
|
+
if (b?.per_page !== undefined)
|
|
752
|
+
j2.append("per_page", String(b.per_page));
|
|
753
|
+
if (b?.sort !== undefined)
|
|
754
|
+
j2.append("sort", b.sort);
|
|
755
|
+
if (b?.direction !== undefined)
|
|
756
|
+
j2.append("direction", b.direction);
|
|
757
|
+
let x = j2.toString(), z = `/user/starred${x ? `?${x}` : ""}`;
|
|
758
|
+
return this.client.get(z, k2);
|
|
666
759
|
}
|
|
667
|
-
|
|
668
|
-
return this.
|
|
760
|
+
isStarred(b, k2, j2) {
|
|
761
|
+
return this.client.get(`/user/starred/${b}/${k2}`, j2);
|
|
669
762
|
}
|
|
670
|
-
|
|
671
|
-
return this.
|
|
763
|
+
star(b, k2, j2) {
|
|
764
|
+
return this.client.put(`/user/starred/${b}/${k2}`, j2);
|
|
672
765
|
}
|
|
673
|
-
|
|
674
|
-
return this.
|
|
766
|
+
unstar(b, k2, j2) {
|
|
767
|
+
return this.client.delete(`/user/starred/${b}/${k2}`, undefined, j2);
|
|
675
768
|
}
|
|
676
|
-
|
|
677
|
-
|
|
769
|
+
}
|
|
770
|
+
|
|
771
|
+
// ../sdk/dist/api/issues.js
|
|
772
|
+
class E3 {
|
|
773
|
+
client;
|
|
774
|
+
constructor(k2) {
|
|
775
|
+
this.client = k2;
|
|
776
|
+
}
|
|
777
|
+
list(k2, A2, b, f) {
|
|
778
|
+
let j2 = new URLSearchParams;
|
|
779
|
+
if (b?.state !== undefined)
|
|
780
|
+
j2.append("state", b.state);
|
|
781
|
+
if (b?.q !== undefined)
|
|
782
|
+
j2.append("q", b.q);
|
|
783
|
+
if (b?.labels !== undefined)
|
|
784
|
+
j2.append("labels", b.labels);
|
|
785
|
+
if (b?.milestones !== undefined)
|
|
786
|
+
j2.append("milestones", b.milestones);
|
|
787
|
+
if (b?.created_by !== undefined)
|
|
788
|
+
j2.append("created_by", b.created_by);
|
|
789
|
+
if (b?.assigned_by !== undefined)
|
|
790
|
+
j2.append("assigned_by", b.assigned_by);
|
|
791
|
+
if (b?.mentioned_by !== undefined)
|
|
792
|
+
j2.append("mentioned_by", b.mentioned_by);
|
|
793
|
+
if (b?.type !== undefined)
|
|
794
|
+
j2.append("type", b.type);
|
|
795
|
+
if (b?.since !== undefined)
|
|
796
|
+
j2.append("since", b.since);
|
|
797
|
+
if (b?.before !== undefined)
|
|
798
|
+
j2.append("before", b.before);
|
|
799
|
+
if (b?.page !== undefined)
|
|
800
|
+
j2.append("page", String(b.page));
|
|
801
|
+
if (b?.per_page !== undefined)
|
|
802
|
+
j2.append("per_page", String(b.per_page));
|
|
803
|
+
let z = j2.toString(), B = `/repos/${k2}/${A2}/issues${z ? `?${z}` : ""}`;
|
|
804
|
+
return this.client.get(B, f);
|
|
805
|
+
}
|
|
806
|
+
getComment(k2, A2, b, f) {
|
|
807
|
+
return this.client.get(`/repos/${k2}/${A2}/issues/comments/${b}`, f);
|
|
808
|
+
}
|
|
809
|
+
get(k2, A2, b, f) {
|
|
810
|
+
return this.client.get(`/repos/${k2}/${A2}/issues/${b}`, f);
|
|
811
|
+
}
|
|
812
|
+
listComments(k2, A2, b, f, j2) {
|
|
813
|
+
let z = new URLSearchParams;
|
|
814
|
+
if (f?.since !== undefined)
|
|
815
|
+
z.append("since", f.since);
|
|
816
|
+
if (f?.before !== undefined)
|
|
817
|
+
z.append("before", f.before);
|
|
818
|
+
let B = z.toString(), D = `/repos/${k2}/${A2}/issues/${b}/comments${B ? `?${B}` : ""}`;
|
|
819
|
+
return this.client.get(D, j2);
|
|
820
|
+
}
|
|
821
|
+
listLabels(k2, A2, b, f) {
|
|
822
|
+
return this.client.get(`/repos/${k2}/${A2}/issues/${b}/labels`, f);
|
|
823
|
+
}
|
|
824
|
+
listTimeline(k2, A2, b, f, j2) {
|
|
825
|
+
let z = new URLSearchParams;
|
|
826
|
+
if (f?.page !== undefined)
|
|
827
|
+
z.append("page", String(f.page));
|
|
828
|
+
if (f?.per_page !== undefined)
|
|
829
|
+
z.append("per_page", String(f.per_page));
|
|
830
|
+
if (f?.since !== undefined)
|
|
831
|
+
z.append("since", f.since);
|
|
832
|
+
if (f?.before !== undefined)
|
|
833
|
+
z.append("before", f.before);
|
|
834
|
+
let B = z.toString(), D = `/repos/${k2}/${A2}/issues/${b}/timeline${B ? `?${B}` : ""}`;
|
|
835
|
+
return this.client.get(D, j2);
|
|
678
836
|
}
|
|
679
837
|
}
|
|
680
838
|
|
|
681
839
|
// ../sdk/dist/api/users.js
|
|
682
|
-
class
|
|
840
|
+
class z {
|
|
683
841
|
client;
|
|
684
|
-
constructor(
|
|
685
|
-
this.client =
|
|
686
|
-
}
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
842
|
+
constructor(j2) {
|
|
843
|
+
this.client = j2;
|
|
844
|
+
}
|
|
845
|
+
list(j2, v2) {
|
|
846
|
+
let k2 = new URLSearchParams;
|
|
847
|
+
if (j2?.q !== undefined)
|
|
848
|
+
k2.append("q", j2.q);
|
|
849
|
+
if (j2?.sort !== undefined)
|
|
850
|
+
k2.append("sort", j2.sort);
|
|
851
|
+
if (j2?.order !== undefined)
|
|
852
|
+
k2.append("order", j2.order);
|
|
853
|
+
if (j2?.page !== undefined)
|
|
854
|
+
k2.append("page", String(j2.page));
|
|
855
|
+
if (j2?.per_page !== undefined)
|
|
856
|
+
k2.append("per_page", String(j2.per_page));
|
|
857
|
+
let w = k2.toString(), x = `/search/users${w ? `?${w}` : ""}`;
|
|
858
|
+
return this.client.get(x, v2);
|
|
859
|
+
}
|
|
860
|
+
getAuthenticated(j2) {
|
|
861
|
+
return this.client.get("/user", j2);
|
|
862
|
+
}
|
|
863
|
+
get(j2, v2) {
|
|
864
|
+
return this.client.get(`/user/${j2}`, v2);
|
|
865
|
+
}
|
|
866
|
+
getByUsername(j2, v2) {
|
|
867
|
+
return this.client.get(`/users/${j2}`, v2);
|
|
692
868
|
}
|
|
693
869
|
}
|
|
694
870
|
|
|
695
871
|
// ../sdk/dist/api/emails.js
|
|
696
|
-
class
|
|
872
|
+
class x {
|
|
697
873
|
client;
|
|
698
874
|
constructor(b) {
|
|
699
875
|
this.client = b;
|
|
700
876
|
}
|
|
701
|
-
list(b) {
|
|
702
|
-
|
|
877
|
+
list(b, f) {
|
|
878
|
+
let j2 = new URLSearchParams;
|
|
879
|
+
if (b?.page !== undefined)
|
|
880
|
+
j2.append("page", String(b.page));
|
|
881
|
+
if (b?.per_page !== undefined)
|
|
882
|
+
j2.append("per_page", String(b.per_page));
|
|
883
|
+
let k2 = j2.toString(), w = `/user/emails${k2 ? `?${k2}` : ""}`;
|
|
884
|
+
return this.client.get(w, f);
|
|
703
885
|
}
|
|
704
|
-
|
|
705
|
-
return this.client.post("/user/emails", b,
|
|
886
|
+
create(b, f) {
|
|
887
|
+
return this.client.post("/user/emails", b, f);
|
|
706
888
|
}
|
|
707
|
-
|
|
708
|
-
return this.client.delete("/user/emails", b,
|
|
889
|
+
delete(b, f) {
|
|
890
|
+
return this.client.delete("/user/emails", b, f);
|
|
709
891
|
}
|
|
710
892
|
}
|
|
711
893
|
|
|
712
894
|
// ../sdk/dist/index.js
|
|
713
|
-
class
|
|
895
|
+
class J {
|
|
714
896
|
client;
|
|
715
|
-
|
|
897
|
+
actions;
|
|
898
|
+
orgs;
|
|
899
|
+
teams;
|
|
716
900
|
repos;
|
|
717
|
-
|
|
901
|
+
issues;
|
|
718
902
|
pulls;
|
|
719
|
-
|
|
903
|
+
releases;
|
|
904
|
+
users;
|
|
720
905
|
emails;
|
|
721
|
-
issues;
|
|
722
906
|
stars;
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
collaborators;
|
|
726
|
-
organizations;
|
|
727
|
-
teams;
|
|
728
|
-
releases;
|
|
729
|
-
git;
|
|
730
|
-
actions;
|
|
731
|
-
constructor(d2 = {}) {
|
|
732
|
-
this.client = new $(d2), this.users = new f(this.client), this.repos = new A(this.client), this.contents = new k4(this.client), this.pulls = new y(this.client), this.forks = new q3(this.client), this.emails = new d(this.client), this.issues = new B(this.client), this.stars = new k3(this.client), this.branches = new g(this.client), this.commits = new j(this.client), this.collaborators = new j3(this.client), this.organizations = new k(this.client), this.teams = new k5(this.client), this.releases = new q2(this.client), this.git = new j4(this.client), this.actions = new x(this.client);
|
|
907
|
+
constructor(b = {}) {
|
|
908
|
+
this.client = new v(b), this.actions = new F2(this.client), this.orgs = new F(this.client), this.teams = new E2(this.client), this.repos = new E(this.client), this.issues = new E3(this.client), this.pulls = new I(this.client), this.releases = new G(this.client), this.users = new z(this.client), this.emails = new x(this.client), this.stars = new A(this.client);
|
|
733
909
|
}
|
|
734
|
-
setToken(
|
|
735
|
-
return this.client.setToken(
|
|
910
|
+
setToken(b) {
|
|
911
|
+
return this.client.setToken(b), this;
|
|
736
912
|
}
|
|
737
913
|
}
|
|
738
914
|
|
|
@@ -742,7 +918,7 @@ class GitVerseReleaseClient {
|
|
|
742
918
|
repoInfo;
|
|
743
919
|
retryFn;
|
|
744
920
|
constructor(token, repoInfo, retryFn) {
|
|
745
|
-
this.client = new
|
|
921
|
+
this.client = new J({ token });
|
|
746
922
|
this.repoInfo = repoInfo;
|
|
747
923
|
this.retryFn = retryFn;
|
|
748
924
|
}
|
|
@@ -1232,8 +1408,8 @@ function createRetryFunction(config) {
|
|
|
1232
1408
|
var VERSION_REGEX = /^(\d+)\.(\d+)\.(\d+)(?:-(.+))?$/;
|
|
1233
1409
|
var PRERELEASE_INCREMENT_REGEX = /^(.+)\.(\d+)$/;
|
|
1234
1410
|
function parseVersion(version) {
|
|
1235
|
-
const
|
|
1236
|
-
const match =
|
|
1411
|
+
const v2 = version.startsWith("v") ? version.slice(1) : version;
|
|
1412
|
+
const match = v2.match(VERSION_REGEX);
|
|
1237
1413
|
if (!(match?.[1] && match[2] && match[3])) {
|
|
1238
1414
|
throw new Error(`Invalid version format: ${version}`);
|
|
1239
1415
|
}
|
|
@@ -1785,6 +1961,10 @@ var RULE_ORDER = [
|
|
|
1785
1961
|
"footer-leading-blank",
|
|
1786
1962
|
"footer-max-line-length"
|
|
1787
1963
|
];
|
|
1964
|
+
function generateParserPreset(comments) {
|
|
1965
|
+
const comment = comments ? " // Support for feat(scope)!, fix! breaking change syntax" : "";
|
|
1966
|
+
return ` parserPreset: "conventional-changelog-conventionalcommits",${comment}`;
|
|
1967
|
+
}
|
|
1788
1968
|
function generateConfigContent(rules, format, comments) {
|
|
1789
1969
|
const rulesObject = buildRulesObject(rules);
|
|
1790
1970
|
if (format === "json") {
|
|
@@ -1808,9 +1988,12 @@ function generateConfigContent(rules, format, comments) {
|
|
|
1808
1988
|
const comment = comments ? generateRuleComment(ruleName, rules) : "";
|
|
1809
1989
|
rulesLines.push(` "${ruleName}": ${formatRuleValue(value)},${comment}`);
|
|
1810
1990
|
}
|
|
1991
|
+
const parserPreset = generateParserPreset(comments);
|
|
1811
1992
|
const content = `${header}${typeImport}${configDeclaration}{
|
|
1812
1993
|
extends: ["@commitlint/config-conventional"],
|
|
1813
1994
|
|
|
1995
|
+
${parserPreset}
|
|
1996
|
+
|
|
1814
1997
|
rules: {
|
|
1815
1998
|
${rulesLines.join(`
|
|
1816
1999
|
`)}
|
|
@@ -1824,6 +2007,7 @@ ${isTS ? "export default config;" : "module.exports = config;"}
|
|
|
1824
2007
|
function generateJSONConfig(rulesObject) {
|
|
1825
2008
|
const config = {
|
|
1826
2009
|
extends: ["@commitlint/config-conventional"],
|
|
2010
|
+
parserPreset: "conventional-changelog-conventionalcommits",
|
|
1827
2011
|
rules: rulesObject
|
|
1828
2012
|
};
|
|
1829
2013
|
return JSON.stringify(config, null, 2);
|
|
@@ -2016,4 +2200,4 @@ Usage: gitverse-release create-only --tag <tag> [--package <name>]`);
|
|
|
2016
2200
|
}
|
|
2017
2201
|
main();
|
|
2018
2202
|
|
|
2019
|
-
//# debugId=
|
|
2203
|
+
//# debugId=2DBE58B556C486E464756E2164756E21
|