maxsimcli 4.9.0 → 4.11.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/README.md +180 -202
- package/dist/assets/CHANGELOG.md +57 -0
- package/dist/assets/templates/workflows/init-existing.md +93 -0
- package/dist/assets/templates/workflows/new-project.md +95 -2
- package/dist/cli.cjs +3964 -9
- package/dist/cli.cjs.map +1 -1
- package/dist/mcp-server.cjs +277 -18
- package/dist/mcp-server.cjs.map +1 -1
- package/package.json +1 -1
package/dist/cli.cjs
CHANGED
|
@@ -41,6 +41,8 @@ let node_process = require("node:process");
|
|
|
41
41
|
node_process = __toESM(node_process);
|
|
42
42
|
let node_tty = require("node:tty");
|
|
43
43
|
node_tty = __toESM(node_tty);
|
|
44
|
+
require("node:crypto");
|
|
45
|
+
let node_util = require("node:util");
|
|
44
46
|
|
|
45
47
|
//#region src/core/types.ts
|
|
46
48
|
function cmdOk(result, rawValue) {
|
|
@@ -1946,14 +1948,14 @@ function childLoggerName(name, childDebugger, { namespace: parentNamespace }) {
|
|
|
1946
1948
|
if (childNamespace.startsWith(parentNamespace)) return childNamespace.substr(parentNamespace.length + 1);
|
|
1947
1949
|
return childNamespace || parentNamespace;
|
|
1948
1950
|
}
|
|
1949
|
-
function createLogger(label, verbose, initialStep, infoDebugger = createLog()) {
|
|
1951
|
+
function createLogger$1(label, verbose, initialStep, infoDebugger = createLog()) {
|
|
1950
1952
|
const labelPrefix = label && `[${label}]` || "";
|
|
1951
1953
|
const spawned = [];
|
|
1952
1954
|
const debugDebugger = typeof verbose === "string" ? infoDebugger.extend(verbose) : verbose;
|
|
1953
1955
|
const key = childLoggerName(filterType(verbose, filterString), debugDebugger, infoDebugger);
|
|
1954
1956
|
return step(initialStep);
|
|
1955
1957
|
function sibling(name, initial) {
|
|
1956
|
-
return append(spawned, createLogger(label, key.replace(/^[^:]+/, name), initial, infoDebugger));
|
|
1958
|
+
return append(spawned, createLogger$1(label, key.replace(/^[^:]+/, name), initial, infoDebugger));
|
|
1957
1959
|
}
|
|
1958
1960
|
function step(phase) {
|
|
1959
1961
|
const stepPrefix = phase && `[${phase}]` || "";
|
|
@@ -1993,7 +1995,7 @@ var init_tasks_pending_queue = __esm({ "src/lib/runners/tasks-pending-queue.ts"(
|
|
|
1993
1995
|
const name = _TasksPendingQueue.getName(task.commands[0]);
|
|
1994
1996
|
return {
|
|
1995
1997
|
task,
|
|
1996
|
-
logger: createLogger(this.logLabel, name),
|
|
1998
|
+
logger: createLogger$1(this.logLabel, name),
|
|
1997
1999
|
name
|
|
1998
2000
|
};
|
|
1999
2001
|
}
|
|
@@ -3425,7 +3427,7 @@ var init_scheduler = __esm({ "src/lib/runners/scheduler.ts"() {
|
|
|
3425
3427
|
Scheduler = class {
|
|
3426
3428
|
constructor(concurrency = 2) {
|
|
3427
3429
|
this.concurrency = concurrency;
|
|
3428
|
-
this.logger = createLogger("", "scheduler");
|
|
3430
|
+
this.logger = createLogger$1("", "scheduler");
|
|
3429
3431
|
this.pending = [];
|
|
3430
3432
|
this.running = [];
|
|
3431
3433
|
this.logger(`Constructed, concurrency=%s`, concurrency);
|
|
@@ -16072,6 +16074,3861 @@ function listAvailableTemplates() {
|
|
|
16072
16074
|
return node_fs.default.readdirSync(dir, { withFileTypes: true }).filter((e) => e.isDirectory()).map((e) => e.name);
|
|
16073
16075
|
}
|
|
16074
16076
|
|
|
16077
|
+
//#endregion
|
|
16078
|
+
//#region ../../node_modules/universal-user-agent/index.js
|
|
16079
|
+
function getUserAgent() {
|
|
16080
|
+
if (typeof navigator === "object" && "userAgent" in navigator) return navigator.userAgent;
|
|
16081
|
+
if (typeof process === "object" && process.version !== void 0) return `Node.js/${process.version.substr(1)} (${process.platform}; ${process.arch})`;
|
|
16082
|
+
return "<environment undetectable>";
|
|
16083
|
+
}
|
|
16084
|
+
|
|
16085
|
+
//#endregion
|
|
16086
|
+
//#region ../../node_modules/before-after-hook/lib/register.js
|
|
16087
|
+
function register(state, name, method, options) {
|
|
16088
|
+
if (typeof method !== "function") throw new Error("method for before hook must be a function");
|
|
16089
|
+
if (!options) options = {};
|
|
16090
|
+
if (Array.isArray(name)) return name.reverse().reduce((callback, name) => {
|
|
16091
|
+
return register.bind(null, state, name, callback, options);
|
|
16092
|
+
}, method)();
|
|
16093
|
+
return Promise.resolve().then(() => {
|
|
16094
|
+
if (!state.registry[name]) return method(options);
|
|
16095
|
+
return state.registry[name].reduce((method, registered) => {
|
|
16096
|
+
return registered.hook.bind(null, method, options);
|
|
16097
|
+
}, method)();
|
|
16098
|
+
});
|
|
16099
|
+
}
|
|
16100
|
+
|
|
16101
|
+
//#endregion
|
|
16102
|
+
//#region ../../node_modules/before-after-hook/lib/add.js
|
|
16103
|
+
function addHook(state, kind, name, hook) {
|
|
16104
|
+
const orig = hook;
|
|
16105
|
+
if (!state.registry[name]) state.registry[name] = [];
|
|
16106
|
+
if (kind === "before") hook = (method, options) => {
|
|
16107
|
+
return Promise.resolve().then(orig.bind(null, options)).then(method.bind(null, options));
|
|
16108
|
+
};
|
|
16109
|
+
if (kind === "after") hook = (method, options) => {
|
|
16110
|
+
let result;
|
|
16111
|
+
return Promise.resolve().then(method.bind(null, options)).then((result_) => {
|
|
16112
|
+
result = result_;
|
|
16113
|
+
return orig(result, options);
|
|
16114
|
+
}).then(() => {
|
|
16115
|
+
return result;
|
|
16116
|
+
});
|
|
16117
|
+
};
|
|
16118
|
+
if (kind === "error") hook = (method, options) => {
|
|
16119
|
+
return Promise.resolve().then(method.bind(null, options)).catch((error) => {
|
|
16120
|
+
return orig(error, options);
|
|
16121
|
+
});
|
|
16122
|
+
};
|
|
16123
|
+
state.registry[name].push({
|
|
16124
|
+
hook,
|
|
16125
|
+
orig
|
|
16126
|
+
});
|
|
16127
|
+
}
|
|
16128
|
+
|
|
16129
|
+
//#endregion
|
|
16130
|
+
//#region ../../node_modules/before-after-hook/lib/remove.js
|
|
16131
|
+
function removeHook(state, name, method) {
|
|
16132
|
+
if (!state.registry[name]) return;
|
|
16133
|
+
const index = state.registry[name].map((registered) => {
|
|
16134
|
+
return registered.orig;
|
|
16135
|
+
}).indexOf(method);
|
|
16136
|
+
if (index === -1) return;
|
|
16137
|
+
state.registry[name].splice(index, 1);
|
|
16138
|
+
}
|
|
16139
|
+
|
|
16140
|
+
//#endregion
|
|
16141
|
+
//#region ../../node_modules/before-after-hook/index.js
|
|
16142
|
+
const bind = Function.bind;
|
|
16143
|
+
const bindable = bind.bind(bind);
|
|
16144
|
+
function bindApi(hook, state, name) {
|
|
16145
|
+
const removeHookRef = bindable(removeHook, null).apply(null, name ? [state, name] : [state]);
|
|
16146
|
+
hook.api = { remove: removeHookRef };
|
|
16147
|
+
hook.remove = removeHookRef;
|
|
16148
|
+
[
|
|
16149
|
+
"before",
|
|
16150
|
+
"error",
|
|
16151
|
+
"after",
|
|
16152
|
+
"wrap"
|
|
16153
|
+
].forEach((kind) => {
|
|
16154
|
+
const args = name ? [
|
|
16155
|
+
state,
|
|
16156
|
+
kind,
|
|
16157
|
+
name
|
|
16158
|
+
] : [state, kind];
|
|
16159
|
+
hook[kind] = hook.api[kind] = bindable(addHook, null).apply(null, args);
|
|
16160
|
+
});
|
|
16161
|
+
}
|
|
16162
|
+
function Singular() {
|
|
16163
|
+
const singularHookName = Symbol("Singular");
|
|
16164
|
+
const singularHookState = { registry: {} };
|
|
16165
|
+
const singularHook = register.bind(null, singularHookState, singularHookName);
|
|
16166
|
+
bindApi(singularHook, singularHookState, singularHookName);
|
|
16167
|
+
return singularHook;
|
|
16168
|
+
}
|
|
16169
|
+
function Collection() {
|
|
16170
|
+
const state = { registry: {} };
|
|
16171
|
+
const hook = register.bind(null, state);
|
|
16172
|
+
bindApi(hook, state);
|
|
16173
|
+
return hook;
|
|
16174
|
+
}
|
|
16175
|
+
var before_after_hook_default = {
|
|
16176
|
+
Singular,
|
|
16177
|
+
Collection
|
|
16178
|
+
};
|
|
16179
|
+
|
|
16180
|
+
//#endregion
|
|
16181
|
+
//#region ../../node_modules/@octokit/endpoint/dist-bundle/index.js
|
|
16182
|
+
var userAgent = `octokit-endpoint.js/0.0.0-development ${getUserAgent()}`;
|
|
16183
|
+
var DEFAULTS = {
|
|
16184
|
+
method: "GET",
|
|
16185
|
+
baseUrl: "https://api.github.com",
|
|
16186
|
+
headers: {
|
|
16187
|
+
accept: "application/vnd.github.v3+json",
|
|
16188
|
+
"user-agent": userAgent
|
|
16189
|
+
},
|
|
16190
|
+
mediaType: { format: "" }
|
|
16191
|
+
};
|
|
16192
|
+
function lowercaseKeys(object) {
|
|
16193
|
+
if (!object) return {};
|
|
16194
|
+
return Object.keys(object).reduce((newObj, key) => {
|
|
16195
|
+
newObj[key.toLowerCase()] = object[key];
|
|
16196
|
+
return newObj;
|
|
16197
|
+
}, {});
|
|
16198
|
+
}
|
|
16199
|
+
function isPlainObject$1(value) {
|
|
16200
|
+
if (typeof value !== "object" || value === null) return false;
|
|
16201
|
+
if (Object.prototype.toString.call(value) !== "[object Object]") return false;
|
|
16202
|
+
const proto = Object.getPrototypeOf(value);
|
|
16203
|
+
if (proto === null) return true;
|
|
16204
|
+
const Ctor = Object.prototype.hasOwnProperty.call(proto, "constructor") && proto.constructor;
|
|
16205
|
+
return typeof Ctor === "function" && Ctor instanceof Ctor && Function.prototype.call(Ctor) === Function.prototype.call(value);
|
|
16206
|
+
}
|
|
16207
|
+
function mergeDeep(defaults, options) {
|
|
16208
|
+
const result = Object.assign({}, defaults);
|
|
16209
|
+
Object.keys(options).forEach((key) => {
|
|
16210
|
+
if (isPlainObject$1(options[key])) if (!(key in defaults)) Object.assign(result, { [key]: options[key] });
|
|
16211
|
+
else result[key] = mergeDeep(defaults[key], options[key]);
|
|
16212
|
+
else Object.assign(result, { [key]: options[key] });
|
|
16213
|
+
});
|
|
16214
|
+
return result;
|
|
16215
|
+
}
|
|
16216
|
+
function removeUndefinedProperties(obj) {
|
|
16217
|
+
for (const key in obj) if (obj[key] === void 0) delete obj[key];
|
|
16218
|
+
return obj;
|
|
16219
|
+
}
|
|
16220
|
+
function merge(defaults, route, options) {
|
|
16221
|
+
if (typeof route === "string") {
|
|
16222
|
+
let [method, url] = route.split(" ");
|
|
16223
|
+
options = Object.assign(url ? {
|
|
16224
|
+
method,
|
|
16225
|
+
url
|
|
16226
|
+
} : { url: method }, options);
|
|
16227
|
+
} else options = Object.assign({}, route);
|
|
16228
|
+
options.headers = lowercaseKeys(options.headers);
|
|
16229
|
+
removeUndefinedProperties(options);
|
|
16230
|
+
removeUndefinedProperties(options.headers);
|
|
16231
|
+
const mergedOptions = mergeDeep(defaults || {}, options);
|
|
16232
|
+
if (options.url === "/graphql") {
|
|
16233
|
+
if (defaults && defaults.mediaType.previews?.length) mergedOptions.mediaType.previews = defaults.mediaType.previews.filter((preview) => !mergedOptions.mediaType.previews.includes(preview)).concat(mergedOptions.mediaType.previews);
|
|
16234
|
+
mergedOptions.mediaType.previews = (mergedOptions.mediaType.previews || []).map((preview) => preview.replace(/-preview/, ""));
|
|
16235
|
+
}
|
|
16236
|
+
return mergedOptions;
|
|
16237
|
+
}
|
|
16238
|
+
function addQueryParameters(url, parameters) {
|
|
16239
|
+
const separator = /\?/.test(url) ? "&" : "?";
|
|
16240
|
+
const names = Object.keys(parameters);
|
|
16241
|
+
if (names.length === 0) return url;
|
|
16242
|
+
return url + separator + names.map((name) => {
|
|
16243
|
+
if (name === "q") return "q=" + parameters.q.split("+").map(encodeURIComponent).join("+");
|
|
16244
|
+
return `${name}=${encodeURIComponent(parameters[name])}`;
|
|
16245
|
+
}).join("&");
|
|
16246
|
+
}
|
|
16247
|
+
var urlVariableRegex = /\{[^{}}]+\}/g;
|
|
16248
|
+
function removeNonChars(variableName) {
|
|
16249
|
+
return variableName.replace(/(?:^\W+)|(?:(?<!\W)\W+$)/g, "").split(/,/);
|
|
16250
|
+
}
|
|
16251
|
+
function extractUrlVariableNames(url) {
|
|
16252
|
+
const matches = url.match(urlVariableRegex);
|
|
16253
|
+
if (!matches) return [];
|
|
16254
|
+
return matches.map(removeNonChars).reduce((a, b) => a.concat(b), []);
|
|
16255
|
+
}
|
|
16256
|
+
function omit(object, keysToOmit) {
|
|
16257
|
+
const result = { __proto__: null };
|
|
16258
|
+
for (const key of Object.keys(object)) if (keysToOmit.indexOf(key) === -1) result[key] = object[key];
|
|
16259
|
+
return result;
|
|
16260
|
+
}
|
|
16261
|
+
function encodeReserved(str) {
|
|
16262
|
+
return str.split(/(%[0-9A-Fa-f]{2})/g).map(function(part) {
|
|
16263
|
+
if (!/%[0-9A-Fa-f]/.test(part)) part = encodeURI(part).replace(/%5B/g, "[").replace(/%5D/g, "]");
|
|
16264
|
+
return part;
|
|
16265
|
+
}).join("");
|
|
16266
|
+
}
|
|
16267
|
+
function encodeUnreserved(str) {
|
|
16268
|
+
return encodeURIComponent(str).replace(/[!'()*]/g, function(c) {
|
|
16269
|
+
return "%" + c.charCodeAt(0).toString(16).toUpperCase();
|
|
16270
|
+
});
|
|
16271
|
+
}
|
|
16272
|
+
function encodeValue(operator, value, key) {
|
|
16273
|
+
value = operator === "+" || operator === "#" ? encodeReserved(value) : encodeUnreserved(value);
|
|
16274
|
+
if (key) return encodeUnreserved(key) + "=" + value;
|
|
16275
|
+
else return value;
|
|
16276
|
+
}
|
|
16277
|
+
function isDefined(value) {
|
|
16278
|
+
return value !== void 0 && value !== null;
|
|
16279
|
+
}
|
|
16280
|
+
function isKeyOperator(operator) {
|
|
16281
|
+
return operator === ";" || operator === "&" || operator === "?";
|
|
16282
|
+
}
|
|
16283
|
+
function getValues(context, operator, key, modifier) {
|
|
16284
|
+
var value = context[key], result = [];
|
|
16285
|
+
if (isDefined(value) && value !== "") if (typeof value === "string" || typeof value === "number" || typeof value === "bigint" || typeof value === "boolean") {
|
|
16286
|
+
value = value.toString();
|
|
16287
|
+
if (modifier && modifier !== "*") value = value.substring(0, parseInt(modifier, 10));
|
|
16288
|
+
result.push(encodeValue(operator, value, isKeyOperator(operator) ? key : ""));
|
|
16289
|
+
} else if (modifier === "*") if (Array.isArray(value)) value.filter(isDefined).forEach(function(value2) {
|
|
16290
|
+
result.push(encodeValue(operator, value2, isKeyOperator(operator) ? key : ""));
|
|
16291
|
+
});
|
|
16292
|
+
else Object.keys(value).forEach(function(k) {
|
|
16293
|
+
if (isDefined(value[k])) result.push(encodeValue(operator, value[k], k));
|
|
16294
|
+
});
|
|
16295
|
+
else {
|
|
16296
|
+
const tmp = [];
|
|
16297
|
+
if (Array.isArray(value)) value.filter(isDefined).forEach(function(value2) {
|
|
16298
|
+
tmp.push(encodeValue(operator, value2));
|
|
16299
|
+
});
|
|
16300
|
+
else Object.keys(value).forEach(function(k) {
|
|
16301
|
+
if (isDefined(value[k])) {
|
|
16302
|
+
tmp.push(encodeUnreserved(k));
|
|
16303
|
+
tmp.push(encodeValue(operator, value[k].toString()));
|
|
16304
|
+
}
|
|
16305
|
+
});
|
|
16306
|
+
if (isKeyOperator(operator)) result.push(encodeUnreserved(key) + "=" + tmp.join(","));
|
|
16307
|
+
else if (tmp.length !== 0) result.push(tmp.join(","));
|
|
16308
|
+
}
|
|
16309
|
+
else if (operator === ";") {
|
|
16310
|
+
if (isDefined(value)) result.push(encodeUnreserved(key));
|
|
16311
|
+
} else if (value === "" && (operator === "&" || operator === "?")) result.push(encodeUnreserved(key) + "=");
|
|
16312
|
+
else if (value === "") result.push("");
|
|
16313
|
+
return result;
|
|
16314
|
+
}
|
|
16315
|
+
function parseUrl(template) {
|
|
16316
|
+
return { expand: expand.bind(null, template) };
|
|
16317
|
+
}
|
|
16318
|
+
function expand(template, context) {
|
|
16319
|
+
var operators = [
|
|
16320
|
+
"+",
|
|
16321
|
+
"#",
|
|
16322
|
+
".",
|
|
16323
|
+
"/",
|
|
16324
|
+
";",
|
|
16325
|
+
"?",
|
|
16326
|
+
"&"
|
|
16327
|
+
];
|
|
16328
|
+
template = template.replace(/\{([^\{\}]+)\}|([^\{\}]+)/g, function(_, expression, literal) {
|
|
16329
|
+
if (expression) {
|
|
16330
|
+
let operator = "";
|
|
16331
|
+
const values = [];
|
|
16332
|
+
if (operators.indexOf(expression.charAt(0)) !== -1) {
|
|
16333
|
+
operator = expression.charAt(0);
|
|
16334
|
+
expression = expression.substr(1);
|
|
16335
|
+
}
|
|
16336
|
+
expression.split(/,/g).forEach(function(variable) {
|
|
16337
|
+
var tmp = /([^:\*]*)(?::(\d+)|(\*))?/.exec(variable);
|
|
16338
|
+
values.push(getValues(context, operator, tmp[1], tmp[2] || tmp[3]));
|
|
16339
|
+
});
|
|
16340
|
+
if (operator && operator !== "+") {
|
|
16341
|
+
var separator = ",";
|
|
16342
|
+
if (operator === "?") separator = "&";
|
|
16343
|
+
else if (operator !== "#") separator = operator;
|
|
16344
|
+
return (values.length !== 0 ? operator : "") + values.join(separator);
|
|
16345
|
+
} else return values.join(",");
|
|
16346
|
+
} else return encodeReserved(literal);
|
|
16347
|
+
});
|
|
16348
|
+
if (template === "/") return template;
|
|
16349
|
+
else return template.replace(/\/$/, "");
|
|
16350
|
+
}
|
|
16351
|
+
function parse(options) {
|
|
16352
|
+
let method = options.method.toUpperCase();
|
|
16353
|
+
let url = (options.url || "/").replace(/:([a-z]\w+)/g, "{$1}");
|
|
16354
|
+
let headers = Object.assign({}, options.headers);
|
|
16355
|
+
let body;
|
|
16356
|
+
let parameters = omit(options, [
|
|
16357
|
+
"method",
|
|
16358
|
+
"baseUrl",
|
|
16359
|
+
"url",
|
|
16360
|
+
"headers",
|
|
16361
|
+
"request",
|
|
16362
|
+
"mediaType"
|
|
16363
|
+
]);
|
|
16364
|
+
const urlVariableNames = extractUrlVariableNames(url);
|
|
16365
|
+
url = parseUrl(url).expand(parameters);
|
|
16366
|
+
if (!/^http/.test(url)) url = options.baseUrl + url;
|
|
16367
|
+
const remainingParameters = omit(parameters, Object.keys(options).filter((option) => urlVariableNames.includes(option)).concat("baseUrl"));
|
|
16368
|
+
if (!/application\/octet-stream/i.test(headers.accept)) {
|
|
16369
|
+
if (options.mediaType.format) headers.accept = headers.accept.split(/,/).map((format) => format.replace(/application\/vnd(\.\w+)(\.v3)?(\.\w+)?(\+json)?$/, `application/vnd$1$2.${options.mediaType.format}`)).join(",");
|
|
16370
|
+
if (url.endsWith("/graphql")) {
|
|
16371
|
+
if (options.mediaType.previews?.length) headers.accept = (headers.accept.match(/(?<![\w-])[\w-]+(?=-preview)/g) || []).concat(options.mediaType.previews).map((preview) => {
|
|
16372
|
+
return `application/vnd.github.${preview}-preview${options.mediaType.format ? `.${options.mediaType.format}` : "+json"}`;
|
|
16373
|
+
}).join(",");
|
|
16374
|
+
}
|
|
16375
|
+
}
|
|
16376
|
+
if (["GET", "HEAD"].includes(method)) url = addQueryParameters(url, remainingParameters);
|
|
16377
|
+
else if ("data" in remainingParameters) body = remainingParameters.data;
|
|
16378
|
+
else if (Object.keys(remainingParameters).length) body = remainingParameters;
|
|
16379
|
+
if (!headers["content-type"] && typeof body !== "undefined") headers["content-type"] = "application/json; charset=utf-8";
|
|
16380
|
+
if (["PATCH", "PUT"].includes(method) && typeof body === "undefined") body = "";
|
|
16381
|
+
return Object.assign({
|
|
16382
|
+
method,
|
|
16383
|
+
url,
|
|
16384
|
+
headers
|
|
16385
|
+
}, typeof body !== "undefined" ? { body } : null, options.request ? { request: options.request } : null);
|
|
16386
|
+
}
|
|
16387
|
+
function endpointWithDefaults(defaults, route, options) {
|
|
16388
|
+
return parse(merge(defaults, route, options));
|
|
16389
|
+
}
|
|
16390
|
+
function withDefaults$2(oldDefaults, newDefaults) {
|
|
16391
|
+
const DEFAULTS2 = merge(oldDefaults, newDefaults);
|
|
16392
|
+
const endpoint2 = endpointWithDefaults.bind(null, DEFAULTS2);
|
|
16393
|
+
return Object.assign(endpoint2, {
|
|
16394
|
+
DEFAULTS: DEFAULTS2,
|
|
16395
|
+
defaults: withDefaults$2.bind(null, DEFAULTS2),
|
|
16396
|
+
merge: merge.bind(null, DEFAULTS2),
|
|
16397
|
+
parse
|
|
16398
|
+
});
|
|
16399
|
+
}
|
|
16400
|
+
var endpoint = withDefaults$2(null, DEFAULTS);
|
|
16401
|
+
|
|
16402
|
+
//#endregion
|
|
16403
|
+
//#region ../../node_modules/fast-content-type-parse/index.js
|
|
16404
|
+
var require_fast_content_type_parse = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
16405
|
+
const NullObject = function NullObject() {};
|
|
16406
|
+
NullObject.prototype = Object.create(null);
|
|
16407
|
+
/**
|
|
16408
|
+
* RegExp to match *( ";" parameter ) in RFC 7231 sec 3.1.1.1
|
|
16409
|
+
*
|
|
16410
|
+
* parameter = token "=" ( token / quoted-string )
|
|
16411
|
+
* token = 1*tchar
|
|
16412
|
+
* tchar = "!" / "#" / "$" / "%" / "&" / "'" / "*"
|
|
16413
|
+
* / "+" / "-" / "." / "^" / "_" / "`" / "|" / "~"
|
|
16414
|
+
* / DIGIT / ALPHA
|
|
16415
|
+
* ; any VCHAR, except delimiters
|
|
16416
|
+
* quoted-string = DQUOTE *( qdtext / quoted-pair ) DQUOTE
|
|
16417
|
+
* qdtext = HTAB / SP / %x21 / %x23-5B / %x5D-7E / obs-text
|
|
16418
|
+
* obs-text = %x80-FF
|
|
16419
|
+
* quoted-pair = "\" ( HTAB / SP / VCHAR / obs-text )
|
|
16420
|
+
*/
|
|
16421
|
+
const paramRE = /; *([!#$%&'*+.^\w`|~-]+)=("(?:[\v\u0020\u0021\u0023-\u005b\u005d-\u007e\u0080-\u00ff]|\\[\v\u0020-\u00ff])*"|[!#$%&'*+.^\w`|~-]+) */gu;
|
|
16422
|
+
/**
|
|
16423
|
+
* RegExp to match quoted-pair in RFC 7230 sec 3.2.6
|
|
16424
|
+
*
|
|
16425
|
+
* quoted-pair = "\" ( HTAB / SP / VCHAR / obs-text )
|
|
16426
|
+
* obs-text = %x80-FF
|
|
16427
|
+
*/
|
|
16428
|
+
const quotedPairRE = /\\([\v\u0020-\u00ff])/gu;
|
|
16429
|
+
/**
|
|
16430
|
+
* RegExp to match type in RFC 7231 sec 3.1.1.1
|
|
16431
|
+
*
|
|
16432
|
+
* media-type = type "/" subtype
|
|
16433
|
+
* type = token
|
|
16434
|
+
* subtype = token
|
|
16435
|
+
*/
|
|
16436
|
+
const mediaTypeRE = /^[!#$%&'*+.^\w|~-]+\/[!#$%&'*+.^\w|~-]+$/u;
|
|
16437
|
+
const defaultContentType = {
|
|
16438
|
+
type: "",
|
|
16439
|
+
parameters: new NullObject()
|
|
16440
|
+
};
|
|
16441
|
+
Object.freeze(defaultContentType.parameters);
|
|
16442
|
+
Object.freeze(defaultContentType);
|
|
16443
|
+
/**
|
|
16444
|
+
* Parse media type to object.
|
|
16445
|
+
*
|
|
16446
|
+
* @param {string|object} header
|
|
16447
|
+
* @return {Object}
|
|
16448
|
+
* @public
|
|
16449
|
+
*/
|
|
16450
|
+
function parse(header) {
|
|
16451
|
+
if (typeof header !== "string") throw new TypeError("argument header is required and must be a string");
|
|
16452
|
+
let index = header.indexOf(";");
|
|
16453
|
+
const type = index !== -1 ? header.slice(0, index).trim() : header.trim();
|
|
16454
|
+
if (mediaTypeRE.test(type) === false) throw new TypeError("invalid media type");
|
|
16455
|
+
const result = {
|
|
16456
|
+
type: type.toLowerCase(),
|
|
16457
|
+
parameters: new NullObject()
|
|
16458
|
+
};
|
|
16459
|
+
if (index === -1) return result;
|
|
16460
|
+
let key;
|
|
16461
|
+
let match;
|
|
16462
|
+
let value;
|
|
16463
|
+
paramRE.lastIndex = index;
|
|
16464
|
+
while (match = paramRE.exec(header)) {
|
|
16465
|
+
if (match.index !== index) throw new TypeError("invalid parameter format");
|
|
16466
|
+
index += match[0].length;
|
|
16467
|
+
key = match[1].toLowerCase();
|
|
16468
|
+
value = match[2];
|
|
16469
|
+
if (value[0] === "\"") {
|
|
16470
|
+
value = value.slice(1, value.length - 1);
|
|
16471
|
+
quotedPairRE.test(value) && (value = value.replace(quotedPairRE, "$1"));
|
|
16472
|
+
}
|
|
16473
|
+
result.parameters[key] = value;
|
|
16474
|
+
}
|
|
16475
|
+
if (index !== header.length) throw new TypeError("invalid parameter format");
|
|
16476
|
+
return result;
|
|
16477
|
+
}
|
|
16478
|
+
function safeParse(header) {
|
|
16479
|
+
if (typeof header !== "string") return defaultContentType;
|
|
16480
|
+
let index = header.indexOf(";");
|
|
16481
|
+
const type = index !== -1 ? header.slice(0, index).trim() : header.trim();
|
|
16482
|
+
if (mediaTypeRE.test(type) === false) return defaultContentType;
|
|
16483
|
+
const result = {
|
|
16484
|
+
type: type.toLowerCase(),
|
|
16485
|
+
parameters: new NullObject()
|
|
16486
|
+
};
|
|
16487
|
+
if (index === -1) return result;
|
|
16488
|
+
let key;
|
|
16489
|
+
let match;
|
|
16490
|
+
let value;
|
|
16491
|
+
paramRE.lastIndex = index;
|
|
16492
|
+
while (match = paramRE.exec(header)) {
|
|
16493
|
+
if (match.index !== index) return defaultContentType;
|
|
16494
|
+
index += match[0].length;
|
|
16495
|
+
key = match[1].toLowerCase();
|
|
16496
|
+
value = match[2];
|
|
16497
|
+
if (value[0] === "\"") {
|
|
16498
|
+
value = value.slice(1, value.length - 1);
|
|
16499
|
+
quotedPairRE.test(value) && (value = value.replace(quotedPairRE, "$1"));
|
|
16500
|
+
}
|
|
16501
|
+
result.parameters[key] = value;
|
|
16502
|
+
}
|
|
16503
|
+
if (index !== header.length) return defaultContentType;
|
|
16504
|
+
return result;
|
|
16505
|
+
}
|
|
16506
|
+
module.exports.default = {
|
|
16507
|
+
parse,
|
|
16508
|
+
safeParse
|
|
16509
|
+
};
|
|
16510
|
+
module.exports.parse = parse;
|
|
16511
|
+
module.exports.safeParse = safeParse;
|
|
16512
|
+
module.exports.defaultContentType = defaultContentType;
|
|
16513
|
+
}));
|
|
16514
|
+
|
|
16515
|
+
//#endregion
|
|
16516
|
+
//#region ../../node_modules/json-with-bigint/json-with-bigint.js
|
|
16517
|
+
var import_fast_content_type_parse = require_fast_content_type_parse();
|
|
16518
|
+
const noiseValue = /^-?\d+n+$/;
|
|
16519
|
+
const originalStringify = JSON.stringify;
|
|
16520
|
+
const originalParse = JSON.parse;
|
|
16521
|
+
const JSONStringify = (value, replacer, space) => {
|
|
16522
|
+
if ("rawJSON" in JSON) return originalStringify(value, (key, value) => {
|
|
16523
|
+
if (typeof value === "bigint") return JSON.rawJSON(value.toString());
|
|
16524
|
+
if (typeof replacer === "function") return replacer(key, value);
|
|
16525
|
+
if (Array.isArray(replacer) && replacer.includes(key)) return value;
|
|
16526
|
+
return value;
|
|
16527
|
+
}, space);
|
|
16528
|
+
if (!value) return originalStringify(value, replacer, space);
|
|
16529
|
+
return originalStringify(value, (key, value) => {
|
|
16530
|
+
if (typeof value === "string" && Boolean(value.match(noiseValue))) return value.toString() + "n";
|
|
16531
|
+
if (typeof value === "bigint") return value.toString() + "n";
|
|
16532
|
+
if (typeof replacer === "function") return replacer(key, value);
|
|
16533
|
+
if (Array.isArray(replacer) && replacer.includes(key)) return value;
|
|
16534
|
+
return value;
|
|
16535
|
+
}, space).replace(/([\[:])?"(-?\d+)n"($|([\\n]|\s)*(\s|[\\n])*[,\}\]])/g, "$1$2$3").replace(/([\[:])?("-?\d+n+)n("$|"([\\n]|\s)*(\s|[\\n])*[,\}\]])/g, "$1$2$3");
|
|
16536
|
+
};
|
|
16537
|
+
const isContextSourceSupported = () => JSON.parse("1", (_, __, context) => !!context && context.source === "1");
|
|
16538
|
+
const JSONParseV2 = (text, reviver) => {
|
|
16539
|
+
const intRegex = /^-?\d+$/;
|
|
16540
|
+
return JSON.parse(text, (key, value, context) => {
|
|
16541
|
+
const isBigNumber = typeof value === "number" && (value > Number.MAX_SAFE_INTEGER || value < Number.MIN_SAFE_INTEGER);
|
|
16542
|
+
const isInt = intRegex.test(context.source);
|
|
16543
|
+
if (isBigNumber && isInt) return BigInt(context.source);
|
|
16544
|
+
if (typeof reviver !== "function") return value;
|
|
16545
|
+
return reviver(key, value, context);
|
|
16546
|
+
});
|
|
16547
|
+
};
|
|
16548
|
+
const JSONParse = (text, reviver) => {
|
|
16549
|
+
if (!text) return originalParse(text, reviver);
|
|
16550
|
+
if (isContextSourceSupported()) return JSONParseV2(text, reviver);
|
|
16551
|
+
const MAX_INT = Number.MAX_SAFE_INTEGER.toString();
|
|
16552
|
+
const MAX_DIGITS = MAX_INT.length;
|
|
16553
|
+
const stringsOrLargeNumbers = /"(?:\\.|[^"])*"|-?(0|[1-9][0-9]*)(\.[0-9]+)?([eE][+-]?[0-9]+)?/g;
|
|
16554
|
+
const noiseValueWithQuotes = /^"-?\d+n+"$/;
|
|
16555
|
+
const customFormat = /^-?\d+n$/;
|
|
16556
|
+
return originalParse(text.replace(stringsOrLargeNumbers, (text, digits, fractional, exponential) => {
|
|
16557
|
+
const isString = text[0] === "\"";
|
|
16558
|
+
if (isString && Boolean(text.match(noiseValueWithQuotes))) return text.substring(0, text.length - 1) + "n\"";
|
|
16559
|
+
const isFractionalOrExponential = fractional || exponential;
|
|
16560
|
+
const isLessThanMaxSafeInt = digits && (digits.length < MAX_DIGITS || digits.length === MAX_DIGITS && digits <= MAX_INT);
|
|
16561
|
+
if (isString || isFractionalOrExponential || isLessThanMaxSafeInt) return text;
|
|
16562
|
+
return "\"" + text + "n\"";
|
|
16563
|
+
}), (key, value, context) => {
|
|
16564
|
+
if (typeof value === "string" && Boolean(value.match(customFormat))) return BigInt(value.substring(0, value.length - 1));
|
|
16565
|
+
if (typeof value === "string" && Boolean(value.match(noiseValue))) return value.substring(0, value.length - 1);
|
|
16566
|
+
if (typeof reviver !== "function") return value;
|
|
16567
|
+
return reviver(key, value, context);
|
|
16568
|
+
});
|
|
16569
|
+
};
|
|
16570
|
+
|
|
16571
|
+
//#endregion
|
|
16572
|
+
//#region ../../node_modules/@octokit/request-error/dist-src/index.js
|
|
16573
|
+
var RequestError = class extends Error {
|
|
16574
|
+
name;
|
|
16575
|
+
/**
|
|
16576
|
+
* http status code
|
|
16577
|
+
*/
|
|
16578
|
+
status;
|
|
16579
|
+
/**
|
|
16580
|
+
* Request options that lead to the error.
|
|
16581
|
+
*/
|
|
16582
|
+
request;
|
|
16583
|
+
/**
|
|
16584
|
+
* Response object if a response was received
|
|
16585
|
+
*/
|
|
16586
|
+
response;
|
|
16587
|
+
constructor(message, statusCode, options) {
|
|
16588
|
+
super(message, { cause: options.cause });
|
|
16589
|
+
this.name = "HttpError";
|
|
16590
|
+
this.status = Number.parseInt(statusCode);
|
|
16591
|
+
if (Number.isNaN(this.status)) this.status = 0;
|
|
16592
|
+
/* v8 ignore else -- @preserve -- Bug with vitest coverage where it sees an else branch that doesn't exist */
|
|
16593
|
+
if ("response" in options) this.response = options.response;
|
|
16594
|
+
const requestCopy = Object.assign({}, options.request);
|
|
16595
|
+
if (options.request.headers.authorization) requestCopy.headers = Object.assign({}, options.request.headers, { authorization: options.request.headers.authorization.replace(/(?<! ) .*$/, " [REDACTED]") });
|
|
16596
|
+
requestCopy.url = requestCopy.url.replace(/\bclient_secret=\w+/g, "client_secret=[REDACTED]").replace(/\baccess_token=\w+/g, "access_token=[REDACTED]");
|
|
16597
|
+
this.request = requestCopy;
|
|
16598
|
+
}
|
|
16599
|
+
};
|
|
16600
|
+
|
|
16601
|
+
//#endregion
|
|
16602
|
+
//#region ../../node_modules/@octokit/request/dist-bundle/index.js
|
|
16603
|
+
var VERSION$8 = "10.0.8";
|
|
16604
|
+
var defaults_default = { headers: { "user-agent": `octokit-request.js/${VERSION$8} ${getUserAgent()}` } };
|
|
16605
|
+
function isPlainObject(value) {
|
|
16606
|
+
if (typeof value !== "object" || value === null) return false;
|
|
16607
|
+
if (Object.prototype.toString.call(value) !== "[object Object]") return false;
|
|
16608
|
+
const proto = Object.getPrototypeOf(value);
|
|
16609
|
+
if (proto === null) return true;
|
|
16610
|
+
const Ctor = Object.prototype.hasOwnProperty.call(proto, "constructor") && proto.constructor;
|
|
16611
|
+
return typeof Ctor === "function" && Ctor instanceof Ctor && Function.prototype.call(Ctor) === Function.prototype.call(value);
|
|
16612
|
+
}
|
|
16613
|
+
var noop$2 = () => "";
|
|
16614
|
+
async function fetchWrapper(requestOptions) {
|
|
16615
|
+
const fetch = requestOptions.request?.fetch || globalThis.fetch;
|
|
16616
|
+
if (!fetch) throw new Error("fetch is not set. Please pass a fetch implementation as new Octokit({ request: { fetch }}). Learn more at https://github.com/octokit/octokit.js/#fetch-missing");
|
|
16617
|
+
const log = requestOptions.request?.log || console;
|
|
16618
|
+
const parseSuccessResponseBody = requestOptions.request?.parseSuccessResponseBody !== false;
|
|
16619
|
+
const body = isPlainObject(requestOptions.body) || Array.isArray(requestOptions.body) ? JSONStringify(requestOptions.body) : requestOptions.body;
|
|
16620
|
+
const requestHeaders = Object.fromEntries(Object.entries(requestOptions.headers).map(([name, value]) => [name, String(value)]));
|
|
16621
|
+
let fetchResponse;
|
|
16622
|
+
try {
|
|
16623
|
+
fetchResponse = await fetch(requestOptions.url, {
|
|
16624
|
+
method: requestOptions.method,
|
|
16625
|
+
body,
|
|
16626
|
+
redirect: requestOptions.request?.redirect,
|
|
16627
|
+
headers: requestHeaders,
|
|
16628
|
+
signal: requestOptions.request?.signal,
|
|
16629
|
+
...requestOptions.body && { duplex: "half" }
|
|
16630
|
+
});
|
|
16631
|
+
} catch (error) {
|
|
16632
|
+
let message = "Unknown Error";
|
|
16633
|
+
if (error instanceof Error) {
|
|
16634
|
+
if (error.name === "AbortError") {
|
|
16635
|
+
error.status = 500;
|
|
16636
|
+
throw error;
|
|
16637
|
+
}
|
|
16638
|
+
message = error.message;
|
|
16639
|
+
if (error.name === "TypeError" && "cause" in error) {
|
|
16640
|
+
if (error.cause instanceof Error) message = error.cause.message;
|
|
16641
|
+
else if (typeof error.cause === "string") message = error.cause;
|
|
16642
|
+
}
|
|
16643
|
+
}
|
|
16644
|
+
const requestError = new RequestError(message, 500, { request: requestOptions });
|
|
16645
|
+
requestError.cause = error;
|
|
16646
|
+
throw requestError;
|
|
16647
|
+
}
|
|
16648
|
+
const status = fetchResponse.status;
|
|
16649
|
+
const url = fetchResponse.url;
|
|
16650
|
+
const responseHeaders = {};
|
|
16651
|
+
for (const [key, value] of fetchResponse.headers) responseHeaders[key] = value;
|
|
16652
|
+
const octokitResponse = {
|
|
16653
|
+
url,
|
|
16654
|
+
status,
|
|
16655
|
+
headers: responseHeaders,
|
|
16656
|
+
data: ""
|
|
16657
|
+
};
|
|
16658
|
+
if ("deprecation" in responseHeaders) {
|
|
16659
|
+
const matches = responseHeaders.link && responseHeaders.link.match(/<([^<>]+)>; rel="deprecation"/);
|
|
16660
|
+
const deprecationLink = matches && matches.pop();
|
|
16661
|
+
log.warn(`[@octokit/request] "${requestOptions.method} ${requestOptions.url}" is deprecated. It is scheduled to be removed on ${responseHeaders.sunset}${deprecationLink ? `. See ${deprecationLink}` : ""}`);
|
|
16662
|
+
}
|
|
16663
|
+
if (status === 204 || status === 205) return octokitResponse;
|
|
16664
|
+
if (requestOptions.method === "HEAD") {
|
|
16665
|
+
if (status < 400) return octokitResponse;
|
|
16666
|
+
throw new RequestError(fetchResponse.statusText, status, {
|
|
16667
|
+
response: octokitResponse,
|
|
16668
|
+
request: requestOptions
|
|
16669
|
+
});
|
|
16670
|
+
}
|
|
16671
|
+
if (status === 304) {
|
|
16672
|
+
octokitResponse.data = await getResponseData(fetchResponse);
|
|
16673
|
+
throw new RequestError("Not modified", status, {
|
|
16674
|
+
response: octokitResponse,
|
|
16675
|
+
request: requestOptions
|
|
16676
|
+
});
|
|
16677
|
+
}
|
|
16678
|
+
if (status >= 400) {
|
|
16679
|
+
octokitResponse.data = await getResponseData(fetchResponse);
|
|
16680
|
+
throw new RequestError(toErrorMessage(octokitResponse.data), status, {
|
|
16681
|
+
response: octokitResponse,
|
|
16682
|
+
request: requestOptions
|
|
16683
|
+
});
|
|
16684
|
+
}
|
|
16685
|
+
octokitResponse.data = parseSuccessResponseBody ? await getResponseData(fetchResponse) : fetchResponse.body;
|
|
16686
|
+
return octokitResponse;
|
|
16687
|
+
}
|
|
16688
|
+
async function getResponseData(response) {
|
|
16689
|
+
const contentType = response.headers.get("content-type");
|
|
16690
|
+
if (!contentType) return response.text().catch(noop$2);
|
|
16691
|
+
const mimetype = (0, import_fast_content_type_parse.safeParse)(contentType);
|
|
16692
|
+
if (isJSONResponse(mimetype)) {
|
|
16693
|
+
let text = "";
|
|
16694
|
+
try {
|
|
16695
|
+
text = await response.text();
|
|
16696
|
+
return JSONParse(text);
|
|
16697
|
+
} catch (err) {
|
|
16698
|
+
return text;
|
|
16699
|
+
}
|
|
16700
|
+
} else if (mimetype.type.startsWith("text/") || mimetype.parameters.charset?.toLowerCase() === "utf-8") return response.text().catch(noop$2);
|
|
16701
|
+
else return response.arrayBuffer().catch(
|
|
16702
|
+
/* v8 ignore next -- @preserve */
|
|
16703
|
+
() => /* @__PURE__ */ new ArrayBuffer(0)
|
|
16704
|
+
);
|
|
16705
|
+
}
|
|
16706
|
+
function isJSONResponse(mimetype) {
|
|
16707
|
+
return mimetype.type === "application/json" || mimetype.type === "application/scim+json";
|
|
16708
|
+
}
|
|
16709
|
+
function toErrorMessage(data) {
|
|
16710
|
+
if (typeof data === "string") return data;
|
|
16711
|
+
if (data instanceof ArrayBuffer) return "Unknown error";
|
|
16712
|
+
if ("message" in data) {
|
|
16713
|
+
const suffix = "documentation_url" in data ? ` - ${data.documentation_url}` : "";
|
|
16714
|
+
return Array.isArray(data.errors) ? `${data.message}: ${data.errors.map((v) => JSON.stringify(v)).join(", ")}${suffix}` : `${data.message}${suffix}`;
|
|
16715
|
+
}
|
|
16716
|
+
return `Unknown error: ${JSON.stringify(data)}`;
|
|
16717
|
+
}
|
|
16718
|
+
function withDefaults$1(oldEndpoint, newDefaults) {
|
|
16719
|
+
const endpoint2 = oldEndpoint.defaults(newDefaults);
|
|
16720
|
+
const newApi = function(route, parameters) {
|
|
16721
|
+
const endpointOptions = endpoint2.merge(route, parameters);
|
|
16722
|
+
if (!endpointOptions.request || !endpointOptions.request.hook) return fetchWrapper(endpoint2.parse(endpointOptions));
|
|
16723
|
+
const request2 = (route2, parameters2) => {
|
|
16724
|
+
return fetchWrapper(endpoint2.parse(endpoint2.merge(route2, parameters2)));
|
|
16725
|
+
};
|
|
16726
|
+
Object.assign(request2, {
|
|
16727
|
+
endpoint: endpoint2,
|
|
16728
|
+
defaults: withDefaults$1.bind(null, endpoint2)
|
|
16729
|
+
});
|
|
16730
|
+
return endpointOptions.request.hook(request2, endpointOptions);
|
|
16731
|
+
};
|
|
16732
|
+
return Object.assign(newApi, {
|
|
16733
|
+
endpoint: endpoint2,
|
|
16734
|
+
defaults: withDefaults$1.bind(null, endpoint2)
|
|
16735
|
+
});
|
|
16736
|
+
}
|
|
16737
|
+
var request = withDefaults$1(endpoint, defaults_default);
|
|
16738
|
+
/* v8 ignore next -- @preserve */
|
|
16739
|
+
/* v8 ignore else -- @preserve */
|
|
16740
|
+
|
|
16741
|
+
//#endregion
|
|
16742
|
+
//#region ../../node_modules/@octokit/graphql/dist-bundle/index.js
|
|
16743
|
+
var VERSION$7 = "0.0.0-development";
|
|
16744
|
+
function _buildMessageForResponseErrors(data) {
|
|
16745
|
+
return `Request failed due to following response errors:
|
|
16746
|
+
` + data.errors.map((e) => ` - ${e.message}`).join("\n");
|
|
16747
|
+
}
|
|
16748
|
+
var GraphqlResponseError = class extends Error {
|
|
16749
|
+
constructor(request2, headers, response) {
|
|
16750
|
+
super(_buildMessageForResponseErrors(response));
|
|
16751
|
+
this.request = request2;
|
|
16752
|
+
this.headers = headers;
|
|
16753
|
+
this.response = response;
|
|
16754
|
+
this.errors = response.errors;
|
|
16755
|
+
this.data = response.data;
|
|
16756
|
+
if (Error.captureStackTrace) Error.captureStackTrace(this, this.constructor);
|
|
16757
|
+
}
|
|
16758
|
+
name = "GraphqlResponseError";
|
|
16759
|
+
errors;
|
|
16760
|
+
data;
|
|
16761
|
+
};
|
|
16762
|
+
var NON_VARIABLE_OPTIONS = [
|
|
16763
|
+
"method",
|
|
16764
|
+
"baseUrl",
|
|
16765
|
+
"url",
|
|
16766
|
+
"headers",
|
|
16767
|
+
"request",
|
|
16768
|
+
"query",
|
|
16769
|
+
"mediaType",
|
|
16770
|
+
"operationName"
|
|
16771
|
+
];
|
|
16772
|
+
var FORBIDDEN_VARIABLE_OPTIONS = [
|
|
16773
|
+
"query",
|
|
16774
|
+
"method",
|
|
16775
|
+
"url"
|
|
16776
|
+
];
|
|
16777
|
+
var GHES_V3_SUFFIX_REGEX = /\/api\/v3\/?$/;
|
|
16778
|
+
function graphql(request2, query, options) {
|
|
16779
|
+
if (options) {
|
|
16780
|
+
if (typeof query === "string" && "query" in options) return Promise.reject(/* @__PURE__ */ new Error(`[@octokit/graphql] "query" cannot be used as variable name`));
|
|
16781
|
+
for (const key in options) {
|
|
16782
|
+
if (!FORBIDDEN_VARIABLE_OPTIONS.includes(key)) continue;
|
|
16783
|
+
return Promise.reject(/* @__PURE__ */ new Error(`[@octokit/graphql] "${key}" cannot be used as variable name`));
|
|
16784
|
+
}
|
|
16785
|
+
}
|
|
16786
|
+
const parsedOptions = typeof query === "string" ? Object.assign({ query }, options) : query;
|
|
16787
|
+
const requestOptions = Object.keys(parsedOptions).reduce((result, key) => {
|
|
16788
|
+
if (NON_VARIABLE_OPTIONS.includes(key)) {
|
|
16789
|
+
result[key] = parsedOptions[key];
|
|
16790
|
+
return result;
|
|
16791
|
+
}
|
|
16792
|
+
if (!result.variables) result.variables = {};
|
|
16793
|
+
result.variables[key] = parsedOptions[key];
|
|
16794
|
+
return result;
|
|
16795
|
+
}, {});
|
|
16796
|
+
const baseUrl = parsedOptions.baseUrl || request2.endpoint.DEFAULTS.baseUrl;
|
|
16797
|
+
if (GHES_V3_SUFFIX_REGEX.test(baseUrl)) requestOptions.url = baseUrl.replace(GHES_V3_SUFFIX_REGEX, "/api/graphql");
|
|
16798
|
+
return request2(requestOptions).then((response) => {
|
|
16799
|
+
if (response.data.errors) {
|
|
16800
|
+
const headers = {};
|
|
16801
|
+
for (const key of Object.keys(response.headers)) headers[key] = response.headers[key];
|
|
16802
|
+
throw new GraphqlResponseError(requestOptions, headers, response.data);
|
|
16803
|
+
}
|
|
16804
|
+
return response.data.data;
|
|
16805
|
+
});
|
|
16806
|
+
}
|
|
16807
|
+
function withDefaults(request2, newDefaults) {
|
|
16808
|
+
const newRequest = request2.defaults(newDefaults);
|
|
16809
|
+
const newApi = (query, options) => {
|
|
16810
|
+
return graphql(newRequest, query, options);
|
|
16811
|
+
};
|
|
16812
|
+
return Object.assign(newApi, {
|
|
16813
|
+
defaults: withDefaults.bind(null, newRequest),
|
|
16814
|
+
endpoint: newRequest.endpoint
|
|
16815
|
+
});
|
|
16816
|
+
}
|
|
16817
|
+
var graphql2 = withDefaults(request, {
|
|
16818
|
+
headers: { "user-agent": `octokit-graphql.js/${VERSION$7} ${getUserAgent()}` },
|
|
16819
|
+
method: "POST",
|
|
16820
|
+
url: "/graphql"
|
|
16821
|
+
});
|
|
16822
|
+
function withCustomRequest(customRequest) {
|
|
16823
|
+
return withDefaults(customRequest, {
|
|
16824
|
+
method: "POST",
|
|
16825
|
+
url: "/graphql"
|
|
16826
|
+
});
|
|
16827
|
+
}
|
|
16828
|
+
|
|
16829
|
+
//#endregion
|
|
16830
|
+
//#region ../../node_modules/@octokit/auth-token/dist-bundle/index.js
|
|
16831
|
+
var b64url = "(?:[a-zA-Z0-9_-]+)";
|
|
16832
|
+
var sep = "\\.";
|
|
16833
|
+
var jwtRE = new RegExp(`^${b64url}${sep}${b64url}${sep}${b64url}$`);
|
|
16834
|
+
var isJWT = jwtRE.test.bind(jwtRE);
|
|
16835
|
+
async function auth(token) {
|
|
16836
|
+
const isApp = isJWT(token);
|
|
16837
|
+
const isInstallation = token.startsWith("v1.") || token.startsWith("ghs_");
|
|
16838
|
+
const isUserToServer = token.startsWith("ghu_");
|
|
16839
|
+
return {
|
|
16840
|
+
type: "token",
|
|
16841
|
+
token,
|
|
16842
|
+
tokenType: isApp ? "app" : isInstallation ? "installation" : isUserToServer ? "user-to-server" : "oauth"
|
|
16843
|
+
};
|
|
16844
|
+
}
|
|
16845
|
+
function withAuthorizationPrefix(token) {
|
|
16846
|
+
if (token.split(/\./).length === 3) return `bearer ${token}`;
|
|
16847
|
+
return `token ${token}`;
|
|
16848
|
+
}
|
|
16849
|
+
async function hook(token, request, route, parameters) {
|
|
16850
|
+
const endpoint = request.endpoint.merge(route, parameters);
|
|
16851
|
+
endpoint.headers.authorization = withAuthorizationPrefix(token);
|
|
16852
|
+
return request(endpoint);
|
|
16853
|
+
}
|
|
16854
|
+
var createTokenAuth = function createTokenAuth2(token) {
|
|
16855
|
+
if (!token) throw new Error("[@octokit/auth-token] No token passed to createTokenAuth");
|
|
16856
|
+
if (typeof token !== "string") throw new Error("[@octokit/auth-token] Token passed to createTokenAuth is not a string");
|
|
16857
|
+
token = token.replace(/^(token|bearer) +/i, "");
|
|
16858
|
+
return Object.assign(auth.bind(null, token), { hook: hook.bind(null, token) });
|
|
16859
|
+
};
|
|
16860
|
+
|
|
16861
|
+
//#endregion
|
|
16862
|
+
//#region ../../node_modules/@octokit/core/dist-src/version.js
|
|
16863
|
+
const VERSION$6 = "7.0.6";
|
|
16864
|
+
|
|
16865
|
+
//#endregion
|
|
16866
|
+
//#region ../../node_modules/@octokit/core/dist-src/index.js
|
|
16867
|
+
const noop$1 = () => {};
|
|
16868
|
+
const consoleWarn = console.warn.bind(console);
|
|
16869
|
+
const consoleError = console.error.bind(console);
|
|
16870
|
+
function createLogger(logger = {}) {
|
|
16871
|
+
if (typeof logger.debug !== "function") logger.debug = noop$1;
|
|
16872
|
+
if (typeof logger.info !== "function") logger.info = noop$1;
|
|
16873
|
+
if (typeof logger.warn !== "function") logger.warn = consoleWarn;
|
|
16874
|
+
if (typeof logger.error !== "function") logger.error = consoleError;
|
|
16875
|
+
return logger;
|
|
16876
|
+
}
|
|
16877
|
+
const userAgentTrail = `octokit-core.js/${VERSION$6} ${getUserAgent()}`;
|
|
16878
|
+
var Octokit$1 = class {
|
|
16879
|
+
static VERSION = VERSION$6;
|
|
16880
|
+
static defaults(defaults) {
|
|
16881
|
+
const OctokitWithDefaults = class extends this {
|
|
16882
|
+
constructor(...args) {
|
|
16883
|
+
const options = args[0] || {};
|
|
16884
|
+
if (typeof defaults === "function") {
|
|
16885
|
+
super(defaults(options));
|
|
16886
|
+
return;
|
|
16887
|
+
}
|
|
16888
|
+
super(Object.assign({}, defaults, options, options.userAgent && defaults.userAgent ? { userAgent: `${options.userAgent} ${defaults.userAgent}` } : null));
|
|
16889
|
+
}
|
|
16890
|
+
};
|
|
16891
|
+
return OctokitWithDefaults;
|
|
16892
|
+
}
|
|
16893
|
+
static plugins = [];
|
|
16894
|
+
/**
|
|
16895
|
+
* Attach a plugin (or many) to your Octokit instance.
|
|
16896
|
+
*
|
|
16897
|
+
* @example
|
|
16898
|
+
* const API = Octokit.plugin(plugin1, plugin2, plugin3, ...)
|
|
16899
|
+
*/
|
|
16900
|
+
static plugin(...newPlugins) {
|
|
16901
|
+
const currentPlugins = this.plugins;
|
|
16902
|
+
const NewOctokit = class extends this {
|
|
16903
|
+
static plugins = currentPlugins.concat(newPlugins.filter((plugin) => !currentPlugins.includes(plugin)));
|
|
16904
|
+
};
|
|
16905
|
+
return NewOctokit;
|
|
16906
|
+
}
|
|
16907
|
+
constructor(options = {}) {
|
|
16908
|
+
const hook = new before_after_hook_default.Collection();
|
|
16909
|
+
const requestDefaults = {
|
|
16910
|
+
baseUrl: request.endpoint.DEFAULTS.baseUrl,
|
|
16911
|
+
headers: {},
|
|
16912
|
+
request: Object.assign({}, options.request, { hook: hook.bind(null, "request") }),
|
|
16913
|
+
mediaType: {
|
|
16914
|
+
previews: [],
|
|
16915
|
+
format: ""
|
|
16916
|
+
}
|
|
16917
|
+
};
|
|
16918
|
+
requestDefaults.headers["user-agent"] = options.userAgent ? `${options.userAgent} ${userAgentTrail}` : userAgentTrail;
|
|
16919
|
+
if (options.baseUrl) requestDefaults.baseUrl = options.baseUrl;
|
|
16920
|
+
if (options.previews) requestDefaults.mediaType.previews = options.previews;
|
|
16921
|
+
if (options.timeZone) requestDefaults.headers["time-zone"] = options.timeZone;
|
|
16922
|
+
this.request = request.defaults(requestDefaults);
|
|
16923
|
+
this.graphql = withCustomRequest(this.request).defaults(requestDefaults);
|
|
16924
|
+
this.log = createLogger(options.log);
|
|
16925
|
+
this.hook = hook;
|
|
16926
|
+
if (!options.authStrategy) if (!options.auth) this.auth = async () => ({ type: "unauthenticated" });
|
|
16927
|
+
else {
|
|
16928
|
+
const auth = createTokenAuth(options.auth);
|
|
16929
|
+
hook.wrap("request", auth.hook);
|
|
16930
|
+
this.auth = auth;
|
|
16931
|
+
}
|
|
16932
|
+
else {
|
|
16933
|
+
const { authStrategy, ...otherOptions } = options;
|
|
16934
|
+
const auth = authStrategy(Object.assign({
|
|
16935
|
+
request: this.request,
|
|
16936
|
+
log: this.log,
|
|
16937
|
+
octokit: this,
|
|
16938
|
+
octokitOptions: otherOptions
|
|
16939
|
+
}, options.auth));
|
|
16940
|
+
hook.wrap("request", auth.hook);
|
|
16941
|
+
this.auth = auth;
|
|
16942
|
+
}
|
|
16943
|
+
const classConstructor = this.constructor;
|
|
16944
|
+
for (let i = 0; i < classConstructor.plugins.length; ++i) Object.assign(this, classConstructor.plugins[i](this, options));
|
|
16945
|
+
}
|
|
16946
|
+
request;
|
|
16947
|
+
graphql;
|
|
16948
|
+
log;
|
|
16949
|
+
hook;
|
|
16950
|
+
auth;
|
|
16951
|
+
};
|
|
16952
|
+
|
|
16953
|
+
//#endregion
|
|
16954
|
+
//#region ../../node_modules/@octokit/plugin-request-log/dist-src/version.js
|
|
16955
|
+
const VERSION$5 = "6.0.0";
|
|
16956
|
+
|
|
16957
|
+
//#endregion
|
|
16958
|
+
//#region ../../node_modules/@octokit/plugin-request-log/dist-src/index.js
|
|
16959
|
+
function requestLog(octokit) {
|
|
16960
|
+
octokit.hook.wrap("request", (request, options) => {
|
|
16961
|
+
octokit.log.debug("request", options);
|
|
16962
|
+
const start = Date.now();
|
|
16963
|
+
const requestOptions = octokit.request.endpoint.parse(options);
|
|
16964
|
+
const path = requestOptions.url.replace(options.baseUrl, "");
|
|
16965
|
+
return request(options).then((response) => {
|
|
16966
|
+
const requestId = response.headers["x-github-request-id"];
|
|
16967
|
+
octokit.log.info(`${requestOptions.method} ${path} - ${response.status} with id ${requestId} in ${Date.now() - start}ms`);
|
|
16968
|
+
return response;
|
|
16969
|
+
}).catch((error) => {
|
|
16970
|
+
const requestId = error.response?.headers["x-github-request-id"] || "UNKNOWN";
|
|
16971
|
+
octokit.log.error(`${requestOptions.method} ${path} - ${error.status} with id ${requestId} in ${Date.now() - start}ms`);
|
|
16972
|
+
throw error;
|
|
16973
|
+
});
|
|
16974
|
+
});
|
|
16975
|
+
}
|
|
16976
|
+
requestLog.VERSION = VERSION$5;
|
|
16977
|
+
|
|
16978
|
+
//#endregion
|
|
16979
|
+
//#region ../../node_modules/@octokit/rest/node_modules/@octokit/plugin-paginate-rest/dist-bundle/index.js
|
|
16980
|
+
var VERSION$4 = "0.0.0-development";
|
|
16981
|
+
function normalizePaginatedListResponse(response) {
|
|
16982
|
+
if (!response.data) return {
|
|
16983
|
+
...response,
|
|
16984
|
+
data: []
|
|
16985
|
+
};
|
|
16986
|
+
if (!(("total_count" in response.data || "total_commits" in response.data) && !("url" in response.data))) return response;
|
|
16987
|
+
const incompleteResults = response.data.incomplete_results;
|
|
16988
|
+
const repositorySelection = response.data.repository_selection;
|
|
16989
|
+
const totalCount = response.data.total_count;
|
|
16990
|
+
const totalCommits = response.data.total_commits;
|
|
16991
|
+
delete response.data.incomplete_results;
|
|
16992
|
+
delete response.data.repository_selection;
|
|
16993
|
+
delete response.data.total_count;
|
|
16994
|
+
delete response.data.total_commits;
|
|
16995
|
+
const namespaceKey = Object.keys(response.data)[0];
|
|
16996
|
+
response.data = response.data[namespaceKey];
|
|
16997
|
+
if (typeof incompleteResults !== "undefined") response.data.incomplete_results = incompleteResults;
|
|
16998
|
+
if (typeof repositorySelection !== "undefined") response.data.repository_selection = repositorySelection;
|
|
16999
|
+
response.data.total_count = totalCount;
|
|
17000
|
+
response.data.total_commits = totalCommits;
|
|
17001
|
+
return response;
|
|
17002
|
+
}
|
|
17003
|
+
function iterator(octokit, route, parameters) {
|
|
17004
|
+
const options = typeof route === "function" ? route.endpoint(parameters) : octokit.request.endpoint(route, parameters);
|
|
17005
|
+
const requestMethod = typeof route === "function" ? route : octokit.request;
|
|
17006
|
+
const method = options.method;
|
|
17007
|
+
const headers = options.headers;
|
|
17008
|
+
let url = options.url;
|
|
17009
|
+
return { [Symbol.asyncIterator]: () => ({ async next() {
|
|
17010
|
+
if (!url) return { done: true };
|
|
17011
|
+
try {
|
|
17012
|
+
const normalizedResponse = normalizePaginatedListResponse(await requestMethod({
|
|
17013
|
+
method,
|
|
17014
|
+
url,
|
|
17015
|
+
headers
|
|
17016
|
+
}));
|
|
17017
|
+
url = ((normalizedResponse.headers.link || "").match(/<([^<>]+)>;\s*rel="next"/) || [])[1];
|
|
17018
|
+
if (!url && "total_commits" in normalizedResponse.data) {
|
|
17019
|
+
const parsedUrl = new URL(normalizedResponse.url);
|
|
17020
|
+
const params = parsedUrl.searchParams;
|
|
17021
|
+
const page = parseInt(params.get("page") || "1", 10);
|
|
17022
|
+
if (page * parseInt(params.get("per_page") || "250", 10) < normalizedResponse.data.total_commits) {
|
|
17023
|
+
params.set("page", String(page + 1));
|
|
17024
|
+
url = parsedUrl.toString();
|
|
17025
|
+
}
|
|
17026
|
+
}
|
|
17027
|
+
return { value: normalizedResponse };
|
|
17028
|
+
} catch (error) {
|
|
17029
|
+
if (error.status !== 409) throw error;
|
|
17030
|
+
url = "";
|
|
17031
|
+
return { value: {
|
|
17032
|
+
status: 200,
|
|
17033
|
+
headers: {},
|
|
17034
|
+
data: []
|
|
17035
|
+
} };
|
|
17036
|
+
}
|
|
17037
|
+
} }) };
|
|
17038
|
+
}
|
|
17039
|
+
function paginate(octokit, route, parameters, mapFn) {
|
|
17040
|
+
if (typeof parameters === "function") {
|
|
17041
|
+
mapFn = parameters;
|
|
17042
|
+
parameters = void 0;
|
|
17043
|
+
}
|
|
17044
|
+
return gather(octokit, [], iterator(octokit, route, parameters)[Symbol.asyncIterator](), mapFn);
|
|
17045
|
+
}
|
|
17046
|
+
function gather(octokit, results, iterator2, mapFn) {
|
|
17047
|
+
return iterator2.next().then((result) => {
|
|
17048
|
+
if (result.done) return results;
|
|
17049
|
+
let earlyExit = false;
|
|
17050
|
+
function done() {
|
|
17051
|
+
earlyExit = true;
|
|
17052
|
+
}
|
|
17053
|
+
results = results.concat(mapFn ? mapFn(result.value, done) : result.value.data);
|
|
17054
|
+
if (earlyExit) return results;
|
|
17055
|
+
return gather(octokit, results, iterator2, mapFn);
|
|
17056
|
+
});
|
|
17057
|
+
}
|
|
17058
|
+
var composePaginateRest = Object.assign(paginate, { iterator });
|
|
17059
|
+
function paginateRest(octokit) {
|
|
17060
|
+
return { paginate: Object.assign(paginate.bind(null, octokit), { iterator: iterator.bind(null, octokit) }) };
|
|
17061
|
+
}
|
|
17062
|
+
paginateRest.VERSION = VERSION$4;
|
|
17063
|
+
|
|
17064
|
+
//#endregion
|
|
17065
|
+
//#region ../../node_modules/@octokit/plugin-rest-endpoint-methods/dist-src/version.js
|
|
17066
|
+
const VERSION$3 = "17.0.0";
|
|
17067
|
+
|
|
17068
|
+
//#endregion
|
|
17069
|
+
//#region ../../node_modules/@octokit/plugin-rest-endpoint-methods/dist-src/generated/endpoints.js
|
|
17070
|
+
var endpoints_default = {
|
|
17071
|
+
actions: {
|
|
17072
|
+
addCustomLabelsToSelfHostedRunnerForOrg: ["POST /orgs/{org}/actions/runners/{runner_id}/labels"],
|
|
17073
|
+
addCustomLabelsToSelfHostedRunnerForRepo: ["POST /repos/{owner}/{repo}/actions/runners/{runner_id}/labels"],
|
|
17074
|
+
addRepoAccessToSelfHostedRunnerGroupInOrg: ["PUT /orgs/{org}/actions/runner-groups/{runner_group_id}/repositories/{repository_id}"],
|
|
17075
|
+
addSelectedRepoToOrgSecret: ["PUT /orgs/{org}/actions/secrets/{secret_name}/repositories/{repository_id}"],
|
|
17076
|
+
addSelectedRepoToOrgVariable: ["PUT /orgs/{org}/actions/variables/{name}/repositories/{repository_id}"],
|
|
17077
|
+
approveWorkflowRun: ["POST /repos/{owner}/{repo}/actions/runs/{run_id}/approve"],
|
|
17078
|
+
cancelWorkflowRun: ["POST /repos/{owner}/{repo}/actions/runs/{run_id}/cancel"],
|
|
17079
|
+
createEnvironmentVariable: ["POST /repos/{owner}/{repo}/environments/{environment_name}/variables"],
|
|
17080
|
+
createHostedRunnerForOrg: ["POST /orgs/{org}/actions/hosted-runners"],
|
|
17081
|
+
createOrUpdateEnvironmentSecret: ["PUT /repos/{owner}/{repo}/environments/{environment_name}/secrets/{secret_name}"],
|
|
17082
|
+
createOrUpdateOrgSecret: ["PUT /orgs/{org}/actions/secrets/{secret_name}"],
|
|
17083
|
+
createOrUpdateRepoSecret: ["PUT /repos/{owner}/{repo}/actions/secrets/{secret_name}"],
|
|
17084
|
+
createOrgVariable: ["POST /orgs/{org}/actions/variables"],
|
|
17085
|
+
createRegistrationTokenForOrg: ["POST /orgs/{org}/actions/runners/registration-token"],
|
|
17086
|
+
createRegistrationTokenForRepo: ["POST /repos/{owner}/{repo}/actions/runners/registration-token"],
|
|
17087
|
+
createRemoveTokenForOrg: ["POST /orgs/{org}/actions/runners/remove-token"],
|
|
17088
|
+
createRemoveTokenForRepo: ["POST /repos/{owner}/{repo}/actions/runners/remove-token"],
|
|
17089
|
+
createRepoVariable: ["POST /repos/{owner}/{repo}/actions/variables"],
|
|
17090
|
+
createWorkflowDispatch: ["POST /repos/{owner}/{repo}/actions/workflows/{workflow_id}/dispatches"],
|
|
17091
|
+
deleteActionsCacheById: ["DELETE /repos/{owner}/{repo}/actions/caches/{cache_id}"],
|
|
17092
|
+
deleteActionsCacheByKey: ["DELETE /repos/{owner}/{repo}/actions/caches{?key,ref}"],
|
|
17093
|
+
deleteArtifact: ["DELETE /repos/{owner}/{repo}/actions/artifacts/{artifact_id}"],
|
|
17094
|
+
deleteCustomImageFromOrg: ["DELETE /orgs/{org}/actions/hosted-runners/images/custom/{image_definition_id}"],
|
|
17095
|
+
deleteCustomImageVersionFromOrg: ["DELETE /orgs/{org}/actions/hosted-runners/images/custom/{image_definition_id}/versions/{version}"],
|
|
17096
|
+
deleteEnvironmentSecret: ["DELETE /repos/{owner}/{repo}/environments/{environment_name}/secrets/{secret_name}"],
|
|
17097
|
+
deleteEnvironmentVariable: ["DELETE /repos/{owner}/{repo}/environments/{environment_name}/variables/{name}"],
|
|
17098
|
+
deleteHostedRunnerForOrg: ["DELETE /orgs/{org}/actions/hosted-runners/{hosted_runner_id}"],
|
|
17099
|
+
deleteOrgSecret: ["DELETE /orgs/{org}/actions/secrets/{secret_name}"],
|
|
17100
|
+
deleteOrgVariable: ["DELETE /orgs/{org}/actions/variables/{name}"],
|
|
17101
|
+
deleteRepoSecret: ["DELETE /repos/{owner}/{repo}/actions/secrets/{secret_name}"],
|
|
17102
|
+
deleteRepoVariable: ["DELETE /repos/{owner}/{repo}/actions/variables/{name}"],
|
|
17103
|
+
deleteSelfHostedRunnerFromOrg: ["DELETE /orgs/{org}/actions/runners/{runner_id}"],
|
|
17104
|
+
deleteSelfHostedRunnerFromRepo: ["DELETE /repos/{owner}/{repo}/actions/runners/{runner_id}"],
|
|
17105
|
+
deleteWorkflowRun: ["DELETE /repos/{owner}/{repo}/actions/runs/{run_id}"],
|
|
17106
|
+
deleteWorkflowRunLogs: ["DELETE /repos/{owner}/{repo}/actions/runs/{run_id}/logs"],
|
|
17107
|
+
disableSelectedRepositoryGithubActionsOrganization: ["DELETE /orgs/{org}/actions/permissions/repositories/{repository_id}"],
|
|
17108
|
+
disableWorkflow: ["PUT /repos/{owner}/{repo}/actions/workflows/{workflow_id}/disable"],
|
|
17109
|
+
downloadArtifact: ["GET /repos/{owner}/{repo}/actions/artifacts/{artifact_id}/{archive_format}"],
|
|
17110
|
+
downloadJobLogsForWorkflowRun: ["GET /repos/{owner}/{repo}/actions/jobs/{job_id}/logs"],
|
|
17111
|
+
downloadWorkflowRunAttemptLogs: ["GET /repos/{owner}/{repo}/actions/runs/{run_id}/attempts/{attempt_number}/logs"],
|
|
17112
|
+
downloadWorkflowRunLogs: ["GET /repos/{owner}/{repo}/actions/runs/{run_id}/logs"],
|
|
17113
|
+
enableSelectedRepositoryGithubActionsOrganization: ["PUT /orgs/{org}/actions/permissions/repositories/{repository_id}"],
|
|
17114
|
+
enableWorkflow: ["PUT /repos/{owner}/{repo}/actions/workflows/{workflow_id}/enable"],
|
|
17115
|
+
forceCancelWorkflowRun: ["POST /repos/{owner}/{repo}/actions/runs/{run_id}/force-cancel"],
|
|
17116
|
+
generateRunnerJitconfigForOrg: ["POST /orgs/{org}/actions/runners/generate-jitconfig"],
|
|
17117
|
+
generateRunnerJitconfigForRepo: ["POST /repos/{owner}/{repo}/actions/runners/generate-jitconfig"],
|
|
17118
|
+
getActionsCacheList: ["GET /repos/{owner}/{repo}/actions/caches"],
|
|
17119
|
+
getActionsCacheUsage: ["GET /repos/{owner}/{repo}/actions/cache/usage"],
|
|
17120
|
+
getActionsCacheUsageByRepoForOrg: ["GET /orgs/{org}/actions/cache/usage-by-repository"],
|
|
17121
|
+
getActionsCacheUsageForOrg: ["GET /orgs/{org}/actions/cache/usage"],
|
|
17122
|
+
getAllowedActionsOrganization: ["GET /orgs/{org}/actions/permissions/selected-actions"],
|
|
17123
|
+
getAllowedActionsRepository: ["GET /repos/{owner}/{repo}/actions/permissions/selected-actions"],
|
|
17124
|
+
getArtifact: ["GET /repos/{owner}/{repo}/actions/artifacts/{artifact_id}"],
|
|
17125
|
+
getCustomImageForOrg: ["GET /orgs/{org}/actions/hosted-runners/images/custom/{image_definition_id}"],
|
|
17126
|
+
getCustomImageVersionForOrg: ["GET /orgs/{org}/actions/hosted-runners/images/custom/{image_definition_id}/versions/{version}"],
|
|
17127
|
+
getCustomOidcSubClaimForRepo: ["GET /repos/{owner}/{repo}/actions/oidc/customization/sub"],
|
|
17128
|
+
getEnvironmentPublicKey: ["GET /repos/{owner}/{repo}/environments/{environment_name}/secrets/public-key"],
|
|
17129
|
+
getEnvironmentSecret: ["GET /repos/{owner}/{repo}/environments/{environment_name}/secrets/{secret_name}"],
|
|
17130
|
+
getEnvironmentVariable: ["GET /repos/{owner}/{repo}/environments/{environment_name}/variables/{name}"],
|
|
17131
|
+
getGithubActionsDefaultWorkflowPermissionsOrganization: ["GET /orgs/{org}/actions/permissions/workflow"],
|
|
17132
|
+
getGithubActionsDefaultWorkflowPermissionsRepository: ["GET /repos/{owner}/{repo}/actions/permissions/workflow"],
|
|
17133
|
+
getGithubActionsPermissionsOrganization: ["GET /orgs/{org}/actions/permissions"],
|
|
17134
|
+
getGithubActionsPermissionsRepository: ["GET /repos/{owner}/{repo}/actions/permissions"],
|
|
17135
|
+
getHostedRunnerForOrg: ["GET /orgs/{org}/actions/hosted-runners/{hosted_runner_id}"],
|
|
17136
|
+
getHostedRunnersGithubOwnedImagesForOrg: ["GET /orgs/{org}/actions/hosted-runners/images/github-owned"],
|
|
17137
|
+
getHostedRunnersLimitsForOrg: ["GET /orgs/{org}/actions/hosted-runners/limits"],
|
|
17138
|
+
getHostedRunnersMachineSpecsForOrg: ["GET /orgs/{org}/actions/hosted-runners/machine-sizes"],
|
|
17139
|
+
getHostedRunnersPartnerImagesForOrg: ["GET /orgs/{org}/actions/hosted-runners/images/partner"],
|
|
17140
|
+
getHostedRunnersPlatformsForOrg: ["GET /orgs/{org}/actions/hosted-runners/platforms"],
|
|
17141
|
+
getJobForWorkflowRun: ["GET /repos/{owner}/{repo}/actions/jobs/{job_id}"],
|
|
17142
|
+
getOrgPublicKey: ["GET /orgs/{org}/actions/secrets/public-key"],
|
|
17143
|
+
getOrgSecret: ["GET /orgs/{org}/actions/secrets/{secret_name}"],
|
|
17144
|
+
getOrgVariable: ["GET /orgs/{org}/actions/variables/{name}"],
|
|
17145
|
+
getPendingDeploymentsForRun: ["GET /repos/{owner}/{repo}/actions/runs/{run_id}/pending_deployments"],
|
|
17146
|
+
getRepoPermissions: [
|
|
17147
|
+
"GET /repos/{owner}/{repo}/actions/permissions",
|
|
17148
|
+
{},
|
|
17149
|
+
{ renamed: ["actions", "getGithubActionsPermissionsRepository"] }
|
|
17150
|
+
],
|
|
17151
|
+
getRepoPublicKey: ["GET /repos/{owner}/{repo}/actions/secrets/public-key"],
|
|
17152
|
+
getRepoSecret: ["GET /repos/{owner}/{repo}/actions/secrets/{secret_name}"],
|
|
17153
|
+
getRepoVariable: ["GET /repos/{owner}/{repo}/actions/variables/{name}"],
|
|
17154
|
+
getReviewsForRun: ["GET /repos/{owner}/{repo}/actions/runs/{run_id}/approvals"],
|
|
17155
|
+
getSelfHostedRunnerForOrg: ["GET /orgs/{org}/actions/runners/{runner_id}"],
|
|
17156
|
+
getSelfHostedRunnerForRepo: ["GET /repos/{owner}/{repo}/actions/runners/{runner_id}"],
|
|
17157
|
+
getWorkflow: ["GET /repos/{owner}/{repo}/actions/workflows/{workflow_id}"],
|
|
17158
|
+
getWorkflowAccessToRepository: ["GET /repos/{owner}/{repo}/actions/permissions/access"],
|
|
17159
|
+
getWorkflowRun: ["GET /repos/{owner}/{repo}/actions/runs/{run_id}"],
|
|
17160
|
+
getWorkflowRunAttempt: ["GET /repos/{owner}/{repo}/actions/runs/{run_id}/attempts/{attempt_number}"],
|
|
17161
|
+
getWorkflowRunUsage: ["GET /repos/{owner}/{repo}/actions/runs/{run_id}/timing"],
|
|
17162
|
+
getWorkflowUsage: ["GET /repos/{owner}/{repo}/actions/workflows/{workflow_id}/timing"],
|
|
17163
|
+
listArtifactsForRepo: ["GET /repos/{owner}/{repo}/actions/artifacts"],
|
|
17164
|
+
listCustomImageVersionsForOrg: ["GET /orgs/{org}/actions/hosted-runners/images/custom/{image_definition_id}/versions"],
|
|
17165
|
+
listCustomImagesForOrg: ["GET /orgs/{org}/actions/hosted-runners/images/custom"],
|
|
17166
|
+
listEnvironmentSecrets: ["GET /repos/{owner}/{repo}/environments/{environment_name}/secrets"],
|
|
17167
|
+
listEnvironmentVariables: ["GET /repos/{owner}/{repo}/environments/{environment_name}/variables"],
|
|
17168
|
+
listGithubHostedRunnersInGroupForOrg: ["GET /orgs/{org}/actions/runner-groups/{runner_group_id}/hosted-runners"],
|
|
17169
|
+
listHostedRunnersForOrg: ["GET /orgs/{org}/actions/hosted-runners"],
|
|
17170
|
+
listJobsForWorkflowRun: ["GET /repos/{owner}/{repo}/actions/runs/{run_id}/jobs"],
|
|
17171
|
+
listJobsForWorkflowRunAttempt: ["GET /repos/{owner}/{repo}/actions/runs/{run_id}/attempts/{attempt_number}/jobs"],
|
|
17172
|
+
listLabelsForSelfHostedRunnerForOrg: ["GET /orgs/{org}/actions/runners/{runner_id}/labels"],
|
|
17173
|
+
listLabelsForSelfHostedRunnerForRepo: ["GET /repos/{owner}/{repo}/actions/runners/{runner_id}/labels"],
|
|
17174
|
+
listOrgSecrets: ["GET /orgs/{org}/actions/secrets"],
|
|
17175
|
+
listOrgVariables: ["GET /orgs/{org}/actions/variables"],
|
|
17176
|
+
listRepoOrganizationSecrets: ["GET /repos/{owner}/{repo}/actions/organization-secrets"],
|
|
17177
|
+
listRepoOrganizationVariables: ["GET /repos/{owner}/{repo}/actions/organization-variables"],
|
|
17178
|
+
listRepoSecrets: ["GET /repos/{owner}/{repo}/actions/secrets"],
|
|
17179
|
+
listRepoVariables: ["GET /repos/{owner}/{repo}/actions/variables"],
|
|
17180
|
+
listRepoWorkflows: ["GET /repos/{owner}/{repo}/actions/workflows"],
|
|
17181
|
+
listRunnerApplicationsForOrg: ["GET /orgs/{org}/actions/runners/downloads"],
|
|
17182
|
+
listRunnerApplicationsForRepo: ["GET /repos/{owner}/{repo}/actions/runners/downloads"],
|
|
17183
|
+
listSelectedReposForOrgSecret: ["GET /orgs/{org}/actions/secrets/{secret_name}/repositories"],
|
|
17184
|
+
listSelectedReposForOrgVariable: ["GET /orgs/{org}/actions/variables/{name}/repositories"],
|
|
17185
|
+
listSelectedRepositoriesEnabledGithubActionsOrganization: ["GET /orgs/{org}/actions/permissions/repositories"],
|
|
17186
|
+
listSelfHostedRunnersForOrg: ["GET /orgs/{org}/actions/runners"],
|
|
17187
|
+
listSelfHostedRunnersForRepo: ["GET /repos/{owner}/{repo}/actions/runners"],
|
|
17188
|
+
listWorkflowRunArtifacts: ["GET /repos/{owner}/{repo}/actions/runs/{run_id}/artifacts"],
|
|
17189
|
+
listWorkflowRuns: ["GET /repos/{owner}/{repo}/actions/workflows/{workflow_id}/runs"],
|
|
17190
|
+
listWorkflowRunsForRepo: ["GET /repos/{owner}/{repo}/actions/runs"],
|
|
17191
|
+
reRunJobForWorkflowRun: ["POST /repos/{owner}/{repo}/actions/jobs/{job_id}/rerun"],
|
|
17192
|
+
reRunWorkflow: ["POST /repos/{owner}/{repo}/actions/runs/{run_id}/rerun"],
|
|
17193
|
+
reRunWorkflowFailedJobs: ["POST /repos/{owner}/{repo}/actions/runs/{run_id}/rerun-failed-jobs"],
|
|
17194
|
+
removeAllCustomLabelsFromSelfHostedRunnerForOrg: ["DELETE /orgs/{org}/actions/runners/{runner_id}/labels"],
|
|
17195
|
+
removeAllCustomLabelsFromSelfHostedRunnerForRepo: ["DELETE /repos/{owner}/{repo}/actions/runners/{runner_id}/labels"],
|
|
17196
|
+
removeCustomLabelFromSelfHostedRunnerForOrg: ["DELETE /orgs/{org}/actions/runners/{runner_id}/labels/{name}"],
|
|
17197
|
+
removeCustomLabelFromSelfHostedRunnerForRepo: ["DELETE /repos/{owner}/{repo}/actions/runners/{runner_id}/labels/{name}"],
|
|
17198
|
+
removeSelectedRepoFromOrgSecret: ["DELETE /orgs/{org}/actions/secrets/{secret_name}/repositories/{repository_id}"],
|
|
17199
|
+
removeSelectedRepoFromOrgVariable: ["DELETE /orgs/{org}/actions/variables/{name}/repositories/{repository_id}"],
|
|
17200
|
+
reviewCustomGatesForRun: ["POST /repos/{owner}/{repo}/actions/runs/{run_id}/deployment_protection_rule"],
|
|
17201
|
+
reviewPendingDeploymentsForRun: ["POST /repos/{owner}/{repo}/actions/runs/{run_id}/pending_deployments"],
|
|
17202
|
+
setAllowedActionsOrganization: ["PUT /orgs/{org}/actions/permissions/selected-actions"],
|
|
17203
|
+
setAllowedActionsRepository: ["PUT /repos/{owner}/{repo}/actions/permissions/selected-actions"],
|
|
17204
|
+
setCustomLabelsForSelfHostedRunnerForOrg: ["PUT /orgs/{org}/actions/runners/{runner_id}/labels"],
|
|
17205
|
+
setCustomLabelsForSelfHostedRunnerForRepo: ["PUT /repos/{owner}/{repo}/actions/runners/{runner_id}/labels"],
|
|
17206
|
+
setCustomOidcSubClaimForRepo: ["PUT /repos/{owner}/{repo}/actions/oidc/customization/sub"],
|
|
17207
|
+
setGithubActionsDefaultWorkflowPermissionsOrganization: ["PUT /orgs/{org}/actions/permissions/workflow"],
|
|
17208
|
+
setGithubActionsDefaultWorkflowPermissionsRepository: ["PUT /repos/{owner}/{repo}/actions/permissions/workflow"],
|
|
17209
|
+
setGithubActionsPermissionsOrganization: ["PUT /orgs/{org}/actions/permissions"],
|
|
17210
|
+
setGithubActionsPermissionsRepository: ["PUT /repos/{owner}/{repo}/actions/permissions"],
|
|
17211
|
+
setSelectedReposForOrgSecret: ["PUT /orgs/{org}/actions/secrets/{secret_name}/repositories"],
|
|
17212
|
+
setSelectedReposForOrgVariable: ["PUT /orgs/{org}/actions/variables/{name}/repositories"],
|
|
17213
|
+
setSelectedRepositoriesEnabledGithubActionsOrganization: ["PUT /orgs/{org}/actions/permissions/repositories"],
|
|
17214
|
+
setWorkflowAccessToRepository: ["PUT /repos/{owner}/{repo}/actions/permissions/access"],
|
|
17215
|
+
updateEnvironmentVariable: ["PATCH /repos/{owner}/{repo}/environments/{environment_name}/variables/{name}"],
|
|
17216
|
+
updateHostedRunnerForOrg: ["PATCH /orgs/{org}/actions/hosted-runners/{hosted_runner_id}"],
|
|
17217
|
+
updateOrgVariable: ["PATCH /orgs/{org}/actions/variables/{name}"],
|
|
17218
|
+
updateRepoVariable: ["PATCH /repos/{owner}/{repo}/actions/variables/{name}"]
|
|
17219
|
+
},
|
|
17220
|
+
activity: {
|
|
17221
|
+
checkRepoIsStarredByAuthenticatedUser: ["GET /user/starred/{owner}/{repo}"],
|
|
17222
|
+
deleteRepoSubscription: ["DELETE /repos/{owner}/{repo}/subscription"],
|
|
17223
|
+
deleteThreadSubscription: ["DELETE /notifications/threads/{thread_id}/subscription"],
|
|
17224
|
+
getFeeds: ["GET /feeds"],
|
|
17225
|
+
getRepoSubscription: ["GET /repos/{owner}/{repo}/subscription"],
|
|
17226
|
+
getThread: ["GET /notifications/threads/{thread_id}"],
|
|
17227
|
+
getThreadSubscriptionForAuthenticatedUser: ["GET /notifications/threads/{thread_id}/subscription"],
|
|
17228
|
+
listEventsForAuthenticatedUser: ["GET /users/{username}/events"],
|
|
17229
|
+
listNotificationsForAuthenticatedUser: ["GET /notifications"],
|
|
17230
|
+
listOrgEventsForAuthenticatedUser: ["GET /users/{username}/events/orgs/{org}"],
|
|
17231
|
+
listPublicEvents: ["GET /events"],
|
|
17232
|
+
listPublicEventsForRepoNetwork: ["GET /networks/{owner}/{repo}/events"],
|
|
17233
|
+
listPublicEventsForUser: ["GET /users/{username}/events/public"],
|
|
17234
|
+
listPublicOrgEvents: ["GET /orgs/{org}/events"],
|
|
17235
|
+
listReceivedEventsForUser: ["GET /users/{username}/received_events"],
|
|
17236
|
+
listReceivedPublicEventsForUser: ["GET /users/{username}/received_events/public"],
|
|
17237
|
+
listRepoEvents: ["GET /repos/{owner}/{repo}/events"],
|
|
17238
|
+
listRepoNotificationsForAuthenticatedUser: ["GET /repos/{owner}/{repo}/notifications"],
|
|
17239
|
+
listReposStarredByAuthenticatedUser: ["GET /user/starred"],
|
|
17240
|
+
listReposStarredByUser: ["GET /users/{username}/starred"],
|
|
17241
|
+
listReposWatchedByUser: ["GET /users/{username}/subscriptions"],
|
|
17242
|
+
listStargazersForRepo: ["GET /repos/{owner}/{repo}/stargazers"],
|
|
17243
|
+
listWatchedReposForAuthenticatedUser: ["GET /user/subscriptions"],
|
|
17244
|
+
listWatchersForRepo: ["GET /repos/{owner}/{repo}/subscribers"],
|
|
17245
|
+
markNotificationsAsRead: ["PUT /notifications"],
|
|
17246
|
+
markRepoNotificationsAsRead: ["PUT /repos/{owner}/{repo}/notifications"],
|
|
17247
|
+
markThreadAsDone: ["DELETE /notifications/threads/{thread_id}"],
|
|
17248
|
+
markThreadAsRead: ["PATCH /notifications/threads/{thread_id}"],
|
|
17249
|
+
setRepoSubscription: ["PUT /repos/{owner}/{repo}/subscription"],
|
|
17250
|
+
setThreadSubscription: ["PUT /notifications/threads/{thread_id}/subscription"],
|
|
17251
|
+
starRepoForAuthenticatedUser: ["PUT /user/starred/{owner}/{repo}"],
|
|
17252
|
+
unstarRepoForAuthenticatedUser: ["DELETE /user/starred/{owner}/{repo}"]
|
|
17253
|
+
},
|
|
17254
|
+
apps: {
|
|
17255
|
+
addRepoToInstallation: [
|
|
17256
|
+
"PUT /user/installations/{installation_id}/repositories/{repository_id}",
|
|
17257
|
+
{},
|
|
17258
|
+
{ renamed: ["apps", "addRepoToInstallationForAuthenticatedUser"] }
|
|
17259
|
+
],
|
|
17260
|
+
addRepoToInstallationForAuthenticatedUser: ["PUT /user/installations/{installation_id}/repositories/{repository_id}"],
|
|
17261
|
+
checkToken: ["POST /applications/{client_id}/token"],
|
|
17262
|
+
createFromManifest: ["POST /app-manifests/{code}/conversions"],
|
|
17263
|
+
createInstallationAccessToken: ["POST /app/installations/{installation_id}/access_tokens"],
|
|
17264
|
+
deleteAuthorization: ["DELETE /applications/{client_id}/grant"],
|
|
17265
|
+
deleteInstallation: ["DELETE /app/installations/{installation_id}"],
|
|
17266
|
+
deleteToken: ["DELETE /applications/{client_id}/token"],
|
|
17267
|
+
getAuthenticated: ["GET /app"],
|
|
17268
|
+
getBySlug: ["GET /apps/{app_slug}"],
|
|
17269
|
+
getInstallation: ["GET /app/installations/{installation_id}"],
|
|
17270
|
+
getOrgInstallation: ["GET /orgs/{org}/installation"],
|
|
17271
|
+
getRepoInstallation: ["GET /repos/{owner}/{repo}/installation"],
|
|
17272
|
+
getSubscriptionPlanForAccount: ["GET /marketplace_listing/accounts/{account_id}"],
|
|
17273
|
+
getSubscriptionPlanForAccountStubbed: ["GET /marketplace_listing/stubbed/accounts/{account_id}"],
|
|
17274
|
+
getUserInstallation: ["GET /users/{username}/installation"],
|
|
17275
|
+
getWebhookConfigForApp: ["GET /app/hook/config"],
|
|
17276
|
+
getWebhookDelivery: ["GET /app/hook/deliveries/{delivery_id}"],
|
|
17277
|
+
listAccountsForPlan: ["GET /marketplace_listing/plans/{plan_id}/accounts"],
|
|
17278
|
+
listAccountsForPlanStubbed: ["GET /marketplace_listing/stubbed/plans/{plan_id}/accounts"],
|
|
17279
|
+
listInstallationReposForAuthenticatedUser: ["GET /user/installations/{installation_id}/repositories"],
|
|
17280
|
+
listInstallationRequestsForAuthenticatedApp: ["GET /app/installation-requests"],
|
|
17281
|
+
listInstallations: ["GET /app/installations"],
|
|
17282
|
+
listInstallationsForAuthenticatedUser: ["GET /user/installations"],
|
|
17283
|
+
listPlans: ["GET /marketplace_listing/plans"],
|
|
17284
|
+
listPlansStubbed: ["GET /marketplace_listing/stubbed/plans"],
|
|
17285
|
+
listReposAccessibleToInstallation: ["GET /installation/repositories"],
|
|
17286
|
+
listSubscriptionsForAuthenticatedUser: ["GET /user/marketplace_purchases"],
|
|
17287
|
+
listSubscriptionsForAuthenticatedUserStubbed: ["GET /user/marketplace_purchases/stubbed"],
|
|
17288
|
+
listWebhookDeliveries: ["GET /app/hook/deliveries"],
|
|
17289
|
+
redeliverWebhookDelivery: ["POST /app/hook/deliveries/{delivery_id}/attempts"],
|
|
17290
|
+
removeRepoFromInstallation: [
|
|
17291
|
+
"DELETE /user/installations/{installation_id}/repositories/{repository_id}",
|
|
17292
|
+
{},
|
|
17293
|
+
{ renamed: ["apps", "removeRepoFromInstallationForAuthenticatedUser"] }
|
|
17294
|
+
],
|
|
17295
|
+
removeRepoFromInstallationForAuthenticatedUser: ["DELETE /user/installations/{installation_id}/repositories/{repository_id}"],
|
|
17296
|
+
resetToken: ["PATCH /applications/{client_id}/token"],
|
|
17297
|
+
revokeInstallationAccessToken: ["DELETE /installation/token"],
|
|
17298
|
+
scopeToken: ["POST /applications/{client_id}/token/scoped"],
|
|
17299
|
+
suspendInstallation: ["PUT /app/installations/{installation_id}/suspended"],
|
|
17300
|
+
unsuspendInstallation: ["DELETE /app/installations/{installation_id}/suspended"],
|
|
17301
|
+
updateWebhookConfigForApp: ["PATCH /app/hook/config"]
|
|
17302
|
+
},
|
|
17303
|
+
billing: {
|
|
17304
|
+
getGithubActionsBillingOrg: ["GET /orgs/{org}/settings/billing/actions"],
|
|
17305
|
+
getGithubActionsBillingUser: ["GET /users/{username}/settings/billing/actions"],
|
|
17306
|
+
getGithubBillingPremiumRequestUsageReportOrg: ["GET /organizations/{org}/settings/billing/premium_request/usage"],
|
|
17307
|
+
getGithubBillingPremiumRequestUsageReportUser: ["GET /users/{username}/settings/billing/premium_request/usage"],
|
|
17308
|
+
getGithubBillingUsageReportOrg: ["GET /organizations/{org}/settings/billing/usage"],
|
|
17309
|
+
getGithubBillingUsageReportUser: ["GET /users/{username}/settings/billing/usage"],
|
|
17310
|
+
getGithubPackagesBillingOrg: ["GET /orgs/{org}/settings/billing/packages"],
|
|
17311
|
+
getGithubPackagesBillingUser: ["GET /users/{username}/settings/billing/packages"],
|
|
17312
|
+
getSharedStorageBillingOrg: ["GET /orgs/{org}/settings/billing/shared-storage"],
|
|
17313
|
+
getSharedStorageBillingUser: ["GET /users/{username}/settings/billing/shared-storage"]
|
|
17314
|
+
},
|
|
17315
|
+
campaigns: {
|
|
17316
|
+
createCampaign: ["POST /orgs/{org}/campaigns"],
|
|
17317
|
+
deleteCampaign: ["DELETE /orgs/{org}/campaigns/{campaign_number}"],
|
|
17318
|
+
getCampaignSummary: ["GET /orgs/{org}/campaigns/{campaign_number}"],
|
|
17319
|
+
listOrgCampaigns: ["GET /orgs/{org}/campaigns"],
|
|
17320
|
+
updateCampaign: ["PATCH /orgs/{org}/campaigns/{campaign_number}"]
|
|
17321
|
+
},
|
|
17322
|
+
checks: {
|
|
17323
|
+
create: ["POST /repos/{owner}/{repo}/check-runs"],
|
|
17324
|
+
createSuite: ["POST /repos/{owner}/{repo}/check-suites"],
|
|
17325
|
+
get: ["GET /repos/{owner}/{repo}/check-runs/{check_run_id}"],
|
|
17326
|
+
getSuite: ["GET /repos/{owner}/{repo}/check-suites/{check_suite_id}"],
|
|
17327
|
+
listAnnotations: ["GET /repos/{owner}/{repo}/check-runs/{check_run_id}/annotations"],
|
|
17328
|
+
listForRef: ["GET /repos/{owner}/{repo}/commits/{ref}/check-runs"],
|
|
17329
|
+
listForSuite: ["GET /repos/{owner}/{repo}/check-suites/{check_suite_id}/check-runs"],
|
|
17330
|
+
listSuitesForRef: ["GET /repos/{owner}/{repo}/commits/{ref}/check-suites"],
|
|
17331
|
+
rerequestRun: ["POST /repos/{owner}/{repo}/check-runs/{check_run_id}/rerequest"],
|
|
17332
|
+
rerequestSuite: ["POST /repos/{owner}/{repo}/check-suites/{check_suite_id}/rerequest"],
|
|
17333
|
+
setSuitesPreferences: ["PATCH /repos/{owner}/{repo}/check-suites/preferences"],
|
|
17334
|
+
update: ["PATCH /repos/{owner}/{repo}/check-runs/{check_run_id}"]
|
|
17335
|
+
},
|
|
17336
|
+
codeScanning: {
|
|
17337
|
+
commitAutofix: ["POST /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}/autofix/commits"],
|
|
17338
|
+
createAutofix: ["POST /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}/autofix"],
|
|
17339
|
+
createVariantAnalysis: ["POST /repos/{owner}/{repo}/code-scanning/codeql/variant-analyses"],
|
|
17340
|
+
deleteAnalysis: ["DELETE /repos/{owner}/{repo}/code-scanning/analyses/{analysis_id}{?confirm_delete}"],
|
|
17341
|
+
deleteCodeqlDatabase: ["DELETE /repos/{owner}/{repo}/code-scanning/codeql/databases/{language}"],
|
|
17342
|
+
getAlert: [
|
|
17343
|
+
"GET /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}",
|
|
17344
|
+
{},
|
|
17345
|
+
{ renamedParameters: { alert_id: "alert_number" } }
|
|
17346
|
+
],
|
|
17347
|
+
getAnalysis: ["GET /repos/{owner}/{repo}/code-scanning/analyses/{analysis_id}"],
|
|
17348
|
+
getAutofix: ["GET /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}/autofix"],
|
|
17349
|
+
getCodeqlDatabase: ["GET /repos/{owner}/{repo}/code-scanning/codeql/databases/{language}"],
|
|
17350
|
+
getDefaultSetup: ["GET /repos/{owner}/{repo}/code-scanning/default-setup"],
|
|
17351
|
+
getSarif: ["GET /repos/{owner}/{repo}/code-scanning/sarifs/{sarif_id}"],
|
|
17352
|
+
getVariantAnalysis: ["GET /repos/{owner}/{repo}/code-scanning/codeql/variant-analyses/{codeql_variant_analysis_id}"],
|
|
17353
|
+
getVariantAnalysisRepoTask: ["GET /repos/{owner}/{repo}/code-scanning/codeql/variant-analyses/{codeql_variant_analysis_id}/repos/{repo_owner}/{repo_name}"],
|
|
17354
|
+
listAlertInstances: ["GET /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}/instances"],
|
|
17355
|
+
listAlertsForOrg: ["GET /orgs/{org}/code-scanning/alerts"],
|
|
17356
|
+
listAlertsForRepo: ["GET /repos/{owner}/{repo}/code-scanning/alerts"],
|
|
17357
|
+
listAlertsInstances: [
|
|
17358
|
+
"GET /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}/instances",
|
|
17359
|
+
{},
|
|
17360
|
+
{ renamed: ["codeScanning", "listAlertInstances"] }
|
|
17361
|
+
],
|
|
17362
|
+
listCodeqlDatabases: ["GET /repos/{owner}/{repo}/code-scanning/codeql/databases"],
|
|
17363
|
+
listRecentAnalyses: ["GET /repos/{owner}/{repo}/code-scanning/analyses"],
|
|
17364
|
+
updateAlert: ["PATCH /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}"],
|
|
17365
|
+
updateDefaultSetup: ["PATCH /repos/{owner}/{repo}/code-scanning/default-setup"],
|
|
17366
|
+
uploadSarif: ["POST /repos/{owner}/{repo}/code-scanning/sarifs"]
|
|
17367
|
+
},
|
|
17368
|
+
codeSecurity: {
|
|
17369
|
+
attachConfiguration: ["POST /orgs/{org}/code-security/configurations/{configuration_id}/attach"],
|
|
17370
|
+
attachEnterpriseConfiguration: ["POST /enterprises/{enterprise}/code-security/configurations/{configuration_id}/attach"],
|
|
17371
|
+
createConfiguration: ["POST /orgs/{org}/code-security/configurations"],
|
|
17372
|
+
createConfigurationForEnterprise: ["POST /enterprises/{enterprise}/code-security/configurations"],
|
|
17373
|
+
deleteConfiguration: ["DELETE /orgs/{org}/code-security/configurations/{configuration_id}"],
|
|
17374
|
+
deleteConfigurationForEnterprise: ["DELETE /enterprises/{enterprise}/code-security/configurations/{configuration_id}"],
|
|
17375
|
+
detachConfiguration: ["DELETE /orgs/{org}/code-security/configurations/detach"],
|
|
17376
|
+
getConfiguration: ["GET /orgs/{org}/code-security/configurations/{configuration_id}"],
|
|
17377
|
+
getConfigurationForRepository: ["GET /repos/{owner}/{repo}/code-security-configuration"],
|
|
17378
|
+
getConfigurationsForEnterprise: ["GET /enterprises/{enterprise}/code-security/configurations"],
|
|
17379
|
+
getConfigurationsForOrg: ["GET /orgs/{org}/code-security/configurations"],
|
|
17380
|
+
getDefaultConfigurations: ["GET /orgs/{org}/code-security/configurations/defaults"],
|
|
17381
|
+
getDefaultConfigurationsForEnterprise: ["GET /enterprises/{enterprise}/code-security/configurations/defaults"],
|
|
17382
|
+
getRepositoriesForConfiguration: ["GET /orgs/{org}/code-security/configurations/{configuration_id}/repositories"],
|
|
17383
|
+
getRepositoriesForEnterpriseConfiguration: ["GET /enterprises/{enterprise}/code-security/configurations/{configuration_id}/repositories"],
|
|
17384
|
+
getSingleConfigurationForEnterprise: ["GET /enterprises/{enterprise}/code-security/configurations/{configuration_id}"],
|
|
17385
|
+
setConfigurationAsDefault: ["PUT /orgs/{org}/code-security/configurations/{configuration_id}/defaults"],
|
|
17386
|
+
setConfigurationAsDefaultForEnterprise: ["PUT /enterprises/{enterprise}/code-security/configurations/{configuration_id}/defaults"],
|
|
17387
|
+
updateConfiguration: ["PATCH /orgs/{org}/code-security/configurations/{configuration_id}"],
|
|
17388
|
+
updateEnterpriseConfiguration: ["PATCH /enterprises/{enterprise}/code-security/configurations/{configuration_id}"]
|
|
17389
|
+
},
|
|
17390
|
+
codesOfConduct: {
|
|
17391
|
+
getAllCodesOfConduct: ["GET /codes_of_conduct"],
|
|
17392
|
+
getConductCode: ["GET /codes_of_conduct/{key}"]
|
|
17393
|
+
},
|
|
17394
|
+
codespaces: {
|
|
17395
|
+
addRepositoryForSecretForAuthenticatedUser: ["PUT /user/codespaces/secrets/{secret_name}/repositories/{repository_id}"],
|
|
17396
|
+
addSelectedRepoToOrgSecret: ["PUT /orgs/{org}/codespaces/secrets/{secret_name}/repositories/{repository_id}"],
|
|
17397
|
+
checkPermissionsForDevcontainer: ["GET /repos/{owner}/{repo}/codespaces/permissions_check"],
|
|
17398
|
+
codespaceMachinesForAuthenticatedUser: ["GET /user/codespaces/{codespace_name}/machines"],
|
|
17399
|
+
createForAuthenticatedUser: ["POST /user/codespaces"],
|
|
17400
|
+
createOrUpdateOrgSecret: ["PUT /orgs/{org}/codespaces/secrets/{secret_name}"],
|
|
17401
|
+
createOrUpdateRepoSecret: ["PUT /repos/{owner}/{repo}/codespaces/secrets/{secret_name}"],
|
|
17402
|
+
createOrUpdateSecretForAuthenticatedUser: ["PUT /user/codespaces/secrets/{secret_name}"],
|
|
17403
|
+
createWithPrForAuthenticatedUser: ["POST /repos/{owner}/{repo}/pulls/{pull_number}/codespaces"],
|
|
17404
|
+
createWithRepoForAuthenticatedUser: ["POST /repos/{owner}/{repo}/codespaces"],
|
|
17405
|
+
deleteForAuthenticatedUser: ["DELETE /user/codespaces/{codespace_name}"],
|
|
17406
|
+
deleteFromOrganization: ["DELETE /orgs/{org}/members/{username}/codespaces/{codespace_name}"],
|
|
17407
|
+
deleteOrgSecret: ["DELETE /orgs/{org}/codespaces/secrets/{secret_name}"],
|
|
17408
|
+
deleteRepoSecret: ["DELETE /repos/{owner}/{repo}/codespaces/secrets/{secret_name}"],
|
|
17409
|
+
deleteSecretForAuthenticatedUser: ["DELETE /user/codespaces/secrets/{secret_name}"],
|
|
17410
|
+
exportForAuthenticatedUser: ["POST /user/codespaces/{codespace_name}/exports"],
|
|
17411
|
+
getCodespacesForUserInOrg: ["GET /orgs/{org}/members/{username}/codespaces"],
|
|
17412
|
+
getExportDetailsForAuthenticatedUser: ["GET /user/codespaces/{codespace_name}/exports/{export_id}"],
|
|
17413
|
+
getForAuthenticatedUser: ["GET /user/codespaces/{codespace_name}"],
|
|
17414
|
+
getOrgPublicKey: ["GET /orgs/{org}/codespaces/secrets/public-key"],
|
|
17415
|
+
getOrgSecret: ["GET /orgs/{org}/codespaces/secrets/{secret_name}"],
|
|
17416
|
+
getPublicKeyForAuthenticatedUser: ["GET /user/codespaces/secrets/public-key"],
|
|
17417
|
+
getRepoPublicKey: ["GET /repos/{owner}/{repo}/codespaces/secrets/public-key"],
|
|
17418
|
+
getRepoSecret: ["GET /repos/{owner}/{repo}/codespaces/secrets/{secret_name}"],
|
|
17419
|
+
getSecretForAuthenticatedUser: ["GET /user/codespaces/secrets/{secret_name}"],
|
|
17420
|
+
listDevcontainersInRepositoryForAuthenticatedUser: ["GET /repos/{owner}/{repo}/codespaces/devcontainers"],
|
|
17421
|
+
listForAuthenticatedUser: ["GET /user/codespaces"],
|
|
17422
|
+
listInOrganization: [
|
|
17423
|
+
"GET /orgs/{org}/codespaces",
|
|
17424
|
+
{},
|
|
17425
|
+
{ renamedParameters: { org_id: "org" } }
|
|
17426
|
+
],
|
|
17427
|
+
listInRepositoryForAuthenticatedUser: ["GET /repos/{owner}/{repo}/codespaces"],
|
|
17428
|
+
listOrgSecrets: ["GET /orgs/{org}/codespaces/secrets"],
|
|
17429
|
+
listRepoSecrets: ["GET /repos/{owner}/{repo}/codespaces/secrets"],
|
|
17430
|
+
listRepositoriesForSecretForAuthenticatedUser: ["GET /user/codespaces/secrets/{secret_name}/repositories"],
|
|
17431
|
+
listSecretsForAuthenticatedUser: ["GET /user/codespaces/secrets"],
|
|
17432
|
+
listSelectedReposForOrgSecret: ["GET /orgs/{org}/codespaces/secrets/{secret_name}/repositories"],
|
|
17433
|
+
preFlightWithRepoForAuthenticatedUser: ["GET /repos/{owner}/{repo}/codespaces/new"],
|
|
17434
|
+
publishForAuthenticatedUser: ["POST /user/codespaces/{codespace_name}/publish"],
|
|
17435
|
+
removeRepositoryForSecretForAuthenticatedUser: ["DELETE /user/codespaces/secrets/{secret_name}/repositories/{repository_id}"],
|
|
17436
|
+
removeSelectedRepoFromOrgSecret: ["DELETE /orgs/{org}/codespaces/secrets/{secret_name}/repositories/{repository_id}"],
|
|
17437
|
+
repoMachinesForAuthenticatedUser: ["GET /repos/{owner}/{repo}/codespaces/machines"],
|
|
17438
|
+
setRepositoriesForSecretForAuthenticatedUser: ["PUT /user/codespaces/secrets/{secret_name}/repositories"],
|
|
17439
|
+
setSelectedReposForOrgSecret: ["PUT /orgs/{org}/codespaces/secrets/{secret_name}/repositories"],
|
|
17440
|
+
startForAuthenticatedUser: ["POST /user/codespaces/{codespace_name}/start"],
|
|
17441
|
+
stopForAuthenticatedUser: ["POST /user/codespaces/{codespace_name}/stop"],
|
|
17442
|
+
stopInOrganization: ["POST /orgs/{org}/members/{username}/codespaces/{codespace_name}/stop"],
|
|
17443
|
+
updateForAuthenticatedUser: ["PATCH /user/codespaces/{codespace_name}"]
|
|
17444
|
+
},
|
|
17445
|
+
copilot: {
|
|
17446
|
+
addCopilotSeatsForTeams: ["POST /orgs/{org}/copilot/billing/selected_teams"],
|
|
17447
|
+
addCopilotSeatsForUsers: ["POST /orgs/{org}/copilot/billing/selected_users"],
|
|
17448
|
+
cancelCopilotSeatAssignmentForTeams: ["DELETE /orgs/{org}/copilot/billing/selected_teams"],
|
|
17449
|
+
cancelCopilotSeatAssignmentForUsers: ["DELETE /orgs/{org}/copilot/billing/selected_users"],
|
|
17450
|
+
copilotMetricsForOrganization: ["GET /orgs/{org}/copilot/metrics"],
|
|
17451
|
+
copilotMetricsForTeam: ["GET /orgs/{org}/team/{team_slug}/copilot/metrics"],
|
|
17452
|
+
getCopilotOrganizationDetails: ["GET /orgs/{org}/copilot/billing"],
|
|
17453
|
+
getCopilotSeatDetailsForUser: ["GET /orgs/{org}/members/{username}/copilot"],
|
|
17454
|
+
listCopilotSeats: ["GET /orgs/{org}/copilot/billing/seats"]
|
|
17455
|
+
},
|
|
17456
|
+
credentials: { revoke: ["POST /credentials/revoke"] },
|
|
17457
|
+
dependabot: {
|
|
17458
|
+
addSelectedRepoToOrgSecret: ["PUT /orgs/{org}/dependabot/secrets/{secret_name}/repositories/{repository_id}"],
|
|
17459
|
+
createOrUpdateOrgSecret: ["PUT /orgs/{org}/dependabot/secrets/{secret_name}"],
|
|
17460
|
+
createOrUpdateRepoSecret: ["PUT /repos/{owner}/{repo}/dependabot/secrets/{secret_name}"],
|
|
17461
|
+
deleteOrgSecret: ["DELETE /orgs/{org}/dependabot/secrets/{secret_name}"],
|
|
17462
|
+
deleteRepoSecret: ["DELETE /repos/{owner}/{repo}/dependabot/secrets/{secret_name}"],
|
|
17463
|
+
getAlert: ["GET /repos/{owner}/{repo}/dependabot/alerts/{alert_number}"],
|
|
17464
|
+
getOrgPublicKey: ["GET /orgs/{org}/dependabot/secrets/public-key"],
|
|
17465
|
+
getOrgSecret: ["GET /orgs/{org}/dependabot/secrets/{secret_name}"],
|
|
17466
|
+
getRepoPublicKey: ["GET /repos/{owner}/{repo}/dependabot/secrets/public-key"],
|
|
17467
|
+
getRepoSecret: ["GET /repos/{owner}/{repo}/dependabot/secrets/{secret_name}"],
|
|
17468
|
+
listAlertsForEnterprise: ["GET /enterprises/{enterprise}/dependabot/alerts"],
|
|
17469
|
+
listAlertsForOrg: ["GET /orgs/{org}/dependabot/alerts"],
|
|
17470
|
+
listAlertsForRepo: ["GET /repos/{owner}/{repo}/dependabot/alerts"],
|
|
17471
|
+
listOrgSecrets: ["GET /orgs/{org}/dependabot/secrets"],
|
|
17472
|
+
listRepoSecrets: ["GET /repos/{owner}/{repo}/dependabot/secrets"],
|
|
17473
|
+
listSelectedReposForOrgSecret: ["GET /orgs/{org}/dependabot/secrets/{secret_name}/repositories"],
|
|
17474
|
+
removeSelectedRepoFromOrgSecret: ["DELETE /orgs/{org}/dependabot/secrets/{secret_name}/repositories/{repository_id}"],
|
|
17475
|
+
repositoryAccessForOrg: ["GET /organizations/{org}/dependabot/repository-access"],
|
|
17476
|
+
setRepositoryAccessDefaultLevel: ["PUT /organizations/{org}/dependabot/repository-access/default-level"],
|
|
17477
|
+
setSelectedReposForOrgSecret: ["PUT /orgs/{org}/dependabot/secrets/{secret_name}/repositories"],
|
|
17478
|
+
updateAlert: ["PATCH /repos/{owner}/{repo}/dependabot/alerts/{alert_number}"],
|
|
17479
|
+
updateRepositoryAccessForOrg: ["PATCH /organizations/{org}/dependabot/repository-access"]
|
|
17480
|
+
},
|
|
17481
|
+
dependencyGraph: {
|
|
17482
|
+
createRepositorySnapshot: ["POST /repos/{owner}/{repo}/dependency-graph/snapshots"],
|
|
17483
|
+
diffRange: ["GET /repos/{owner}/{repo}/dependency-graph/compare/{basehead}"],
|
|
17484
|
+
exportSbom: ["GET /repos/{owner}/{repo}/dependency-graph/sbom"]
|
|
17485
|
+
},
|
|
17486
|
+
emojis: { get: ["GET /emojis"] },
|
|
17487
|
+
enterpriseTeamMemberships: {
|
|
17488
|
+
add: ["PUT /enterprises/{enterprise}/teams/{enterprise-team}/memberships/{username}"],
|
|
17489
|
+
bulkAdd: ["POST /enterprises/{enterprise}/teams/{enterprise-team}/memberships/add"],
|
|
17490
|
+
bulkRemove: ["POST /enterprises/{enterprise}/teams/{enterprise-team}/memberships/remove"],
|
|
17491
|
+
get: ["GET /enterprises/{enterprise}/teams/{enterprise-team}/memberships/{username}"],
|
|
17492
|
+
list: ["GET /enterprises/{enterprise}/teams/{enterprise-team}/memberships"],
|
|
17493
|
+
remove: ["DELETE /enterprises/{enterprise}/teams/{enterprise-team}/memberships/{username}"]
|
|
17494
|
+
},
|
|
17495
|
+
enterpriseTeamOrganizations: {
|
|
17496
|
+
add: ["PUT /enterprises/{enterprise}/teams/{enterprise-team}/organizations/{org}"],
|
|
17497
|
+
bulkAdd: ["POST /enterprises/{enterprise}/teams/{enterprise-team}/organizations/add"],
|
|
17498
|
+
bulkRemove: ["POST /enterprises/{enterprise}/teams/{enterprise-team}/organizations/remove"],
|
|
17499
|
+
delete: ["DELETE /enterprises/{enterprise}/teams/{enterprise-team}/organizations/{org}"],
|
|
17500
|
+
getAssignment: ["GET /enterprises/{enterprise}/teams/{enterprise-team}/organizations/{org}"],
|
|
17501
|
+
getAssignments: ["GET /enterprises/{enterprise}/teams/{enterprise-team}/organizations"]
|
|
17502
|
+
},
|
|
17503
|
+
enterpriseTeams: {
|
|
17504
|
+
create: ["POST /enterprises/{enterprise}/teams"],
|
|
17505
|
+
delete: ["DELETE /enterprises/{enterprise}/teams/{team_slug}"],
|
|
17506
|
+
get: ["GET /enterprises/{enterprise}/teams/{team_slug}"],
|
|
17507
|
+
list: ["GET /enterprises/{enterprise}/teams"],
|
|
17508
|
+
update: ["PATCH /enterprises/{enterprise}/teams/{team_slug}"]
|
|
17509
|
+
},
|
|
17510
|
+
gists: {
|
|
17511
|
+
checkIsStarred: ["GET /gists/{gist_id}/star"],
|
|
17512
|
+
create: ["POST /gists"],
|
|
17513
|
+
createComment: ["POST /gists/{gist_id}/comments"],
|
|
17514
|
+
delete: ["DELETE /gists/{gist_id}"],
|
|
17515
|
+
deleteComment: ["DELETE /gists/{gist_id}/comments/{comment_id}"],
|
|
17516
|
+
fork: ["POST /gists/{gist_id}/forks"],
|
|
17517
|
+
get: ["GET /gists/{gist_id}"],
|
|
17518
|
+
getComment: ["GET /gists/{gist_id}/comments/{comment_id}"],
|
|
17519
|
+
getRevision: ["GET /gists/{gist_id}/{sha}"],
|
|
17520
|
+
list: ["GET /gists"],
|
|
17521
|
+
listComments: ["GET /gists/{gist_id}/comments"],
|
|
17522
|
+
listCommits: ["GET /gists/{gist_id}/commits"],
|
|
17523
|
+
listForUser: ["GET /users/{username}/gists"],
|
|
17524
|
+
listForks: ["GET /gists/{gist_id}/forks"],
|
|
17525
|
+
listPublic: ["GET /gists/public"],
|
|
17526
|
+
listStarred: ["GET /gists/starred"],
|
|
17527
|
+
star: ["PUT /gists/{gist_id}/star"],
|
|
17528
|
+
unstar: ["DELETE /gists/{gist_id}/star"],
|
|
17529
|
+
update: ["PATCH /gists/{gist_id}"],
|
|
17530
|
+
updateComment: ["PATCH /gists/{gist_id}/comments/{comment_id}"]
|
|
17531
|
+
},
|
|
17532
|
+
git: {
|
|
17533
|
+
createBlob: ["POST /repos/{owner}/{repo}/git/blobs"],
|
|
17534
|
+
createCommit: ["POST /repos/{owner}/{repo}/git/commits"],
|
|
17535
|
+
createRef: ["POST /repos/{owner}/{repo}/git/refs"],
|
|
17536
|
+
createTag: ["POST /repos/{owner}/{repo}/git/tags"],
|
|
17537
|
+
createTree: ["POST /repos/{owner}/{repo}/git/trees"],
|
|
17538
|
+
deleteRef: ["DELETE /repos/{owner}/{repo}/git/refs/{ref}"],
|
|
17539
|
+
getBlob: ["GET /repos/{owner}/{repo}/git/blobs/{file_sha}"],
|
|
17540
|
+
getCommit: ["GET /repos/{owner}/{repo}/git/commits/{commit_sha}"],
|
|
17541
|
+
getRef: ["GET /repos/{owner}/{repo}/git/ref/{ref}"],
|
|
17542
|
+
getTag: ["GET /repos/{owner}/{repo}/git/tags/{tag_sha}"],
|
|
17543
|
+
getTree: ["GET /repos/{owner}/{repo}/git/trees/{tree_sha}"],
|
|
17544
|
+
listMatchingRefs: ["GET /repos/{owner}/{repo}/git/matching-refs/{ref}"],
|
|
17545
|
+
updateRef: ["PATCH /repos/{owner}/{repo}/git/refs/{ref}"]
|
|
17546
|
+
},
|
|
17547
|
+
gitignore: {
|
|
17548
|
+
getAllTemplates: ["GET /gitignore/templates"],
|
|
17549
|
+
getTemplate: ["GET /gitignore/templates/{name}"]
|
|
17550
|
+
},
|
|
17551
|
+
hostedCompute: {
|
|
17552
|
+
createNetworkConfigurationForOrg: ["POST /orgs/{org}/settings/network-configurations"],
|
|
17553
|
+
deleteNetworkConfigurationFromOrg: ["DELETE /orgs/{org}/settings/network-configurations/{network_configuration_id}"],
|
|
17554
|
+
getNetworkConfigurationForOrg: ["GET /orgs/{org}/settings/network-configurations/{network_configuration_id}"],
|
|
17555
|
+
getNetworkSettingsForOrg: ["GET /orgs/{org}/settings/network-settings/{network_settings_id}"],
|
|
17556
|
+
listNetworkConfigurationsForOrg: ["GET /orgs/{org}/settings/network-configurations"],
|
|
17557
|
+
updateNetworkConfigurationForOrg: ["PATCH /orgs/{org}/settings/network-configurations/{network_configuration_id}"]
|
|
17558
|
+
},
|
|
17559
|
+
interactions: {
|
|
17560
|
+
getRestrictionsForAuthenticatedUser: ["GET /user/interaction-limits"],
|
|
17561
|
+
getRestrictionsForOrg: ["GET /orgs/{org}/interaction-limits"],
|
|
17562
|
+
getRestrictionsForRepo: ["GET /repos/{owner}/{repo}/interaction-limits"],
|
|
17563
|
+
getRestrictionsForYourPublicRepos: [
|
|
17564
|
+
"GET /user/interaction-limits",
|
|
17565
|
+
{},
|
|
17566
|
+
{ renamed: ["interactions", "getRestrictionsForAuthenticatedUser"] }
|
|
17567
|
+
],
|
|
17568
|
+
removeRestrictionsForAuthenticatedUser: ["DELETE /user/interaction-limits"],
|
|
17569
|
+
removeRestrictionsForOrg: ["DELETE /orgs/{org}/interaction-limits"],
|
|
17570
|
+
removeRestrictionsForRepo: ["DELETE /repos/{owner}/{repo}/interaction-limits"],
|
|
17571
|
+
removeRestrictionsForYourPublicRepos: [
|
|
17572
|
+
"DELETE /user/interaction-limits",
|
|
17573
|
+
{},
|
|
17574
|
+
{ renamed: ["interactions", "removeRestrictionsForAuthenticatedUser"] }
|
|
17575
|
+
],
|
|
17576
|
+
setRestrictionsForAuthenticatedUser: ["PUT /user/interaction-limits"],
|
|
17577
|
+
setRestrictionsForOrg: ["PUT /orgs/{org}/interaction-limits"],
|
|
17578
|
+
setRestrictionsForRepo: ["PUT /repos/{owner}/{repo}/interaction-limits"],
|
|
17579
|
+
setRestrictionsForYourPublicRepos: [
|
|
17580
|
+
"PUT /user/interaction-limits",
|
|
17581
|
+
{},
|
|
17582
|
+
{ renamed: ["interactions", "setRestrictionsForAuthenticatedUser"] }
|
|
17583
|
+
]
|
|
17584
|
+
},
|
|
17585
|
+
issues: {
|
|
17586
|
+
addAssignees: ["POST /repos/{owner}/{repo}/issues/{issue_number}/assignees"],
|
|
17587
|
+
addBlockedByDependency: ["POST /repos/{owner}/{repo}/issues/{issue_number}/dependencies/blocked_by"],
|
|
17588
|
+
addLabels: ["POST /repos/{owner}/{repo}/issues/{issue_number}/labels"],
|
|
17589
|
+
addSubIssue: ["POST /repos/{owner}/{repo}/issues/{issue_number}/sub_issues"],
|
|
17590
|
+
checkUserCanBeAssigned: ["GET /repos/{owner}/{repo}/assignees/{assignee}"],
|
|
17591
|
+
checkUserCanBeAssignedToIssue: ["GET /repos/{owner}/{repo}/issues/{issue_number}/assignees/{assignee}"],
|
|
17592
|
+
create: ["POST /repos/{owner}/{repo}/issues"],
|
|
17593
|
+
createComment: ["POST /repos/{owner}/{repo}/issues/{issue_number}/comments"],
|
|
17594
|
+
createLabel: ["POST /repos/{owner}/{repo}/labels"],
|
|
17595
|
+
createMilestone: ["POST /repos/{owner}/{repo}/milestones"],
|
|
17596
|
+
deleteComment: ["DELETE /repos/{owner}/{repo}/issues/comments/{comment_id}"],
|
|
17597
|
+
deleteLabel: ["DELETE /repos/{owner}/{repo}/labels/{name}"],
|
|
17598
|
+
deleteMilestone: ["DELETE /repos/{owner}/{repo}/milestones/{milestone_number}"],
|
|
17599
|
+
get: ["GET /repos/{owner}/{repo}/issues/{issue_number}"],
|
|
17600
|
+
getComment: ["GET /repos/{owner}/{repo}/issues/comments/{comment_id}"],
|
|
17601
|
+
getEvent: ["GET /repos/{owner}/{repo}/issues/events/{event_id}"],
|
|
17602
|
+
getLabel: ["GET /repos/{owner}/{repo}/labels/{name}"],
|
|
17603
|
+
getMilestone: ["GET /repos/{owner}/{repo}/milestones/{milestone_number}"],
|
|
17604
|
+
getParent: ["GET /repos/{owner}/{repo}/issues/{issue_number}/parent"],
|
|
17605
|
+
list: ["GET /issues"],
|
|
17606
|
+
listAssignees: ["GET /repos/{owner}/{repo}/assignees"],
|
|
17607
|
+
listComments: ["GET /repos/{owner}/{repo}/issues/{issue_number}/comments"],
|
|
17608
|
+
listCommentsForRepo: ["GET /repos/{owner}/{repo}/issues/comments"],
|
|
17609
|
+
listDependenciesBlockedBy: ["GET /repos/{owner}/{repo}/issues/{issue_number}/dependencies/blocked_by"],
|
|
17610
|
+
listDependenciesBlocking: ["GET /repos/{owner}/{repo}/issues/{issue_number}/dependencies/blocking"],
|
|
17611
|
+
listEvents: ["GET /repos/{owner}/{repo}/issues/{issue_number}/events"],
|
|
17612
|
+
listEventsForRepo: ["GET /repos/{owner}/{repo}/issues/events"],
|
|
17613
|
+
listEventsForTimeline: ["GET /repos/{owner}/{repo}/issues/{issue_number}/timeline"],
|
|
17614
|
+
listForAuthenticatedUser: ["GET /user/issues"],
|
|
17615
|
+
listForOrg: ["GET /orgs/{org}/issues"],
|
|
17616
|
+
listForRepo: ["GET /repos/{owner}/{repo}/issues"],
|
|
17617
|
+
listLabelsForMilestone: ["GET /repos/{owner}/{repo}/milestones/{milestone_number}/labels"],
|
|
17618
|
+
listLabelsForRepo: ["GET /repos/{owner}/{repo}/labels"],
|
|
17619
|
+
listLabelsOnIssue: ["GET /repos/{owner}/{repo}/issues/{issue_number}/labels"],
|
|
17620
|
+
listMilestones: ["GET /repos/{owner}/{repo}/milestones"],
|
|
17621
|
+
listSubIssues: ["GET /repos/{owner}/{repo}/issues/{issue_number}/sub_issues"],
|
|
17622
|
+
lock: ["PUT /repos/{owner}/{repo}/issues/{issue_number}/lock"],
|
|
17623
|
+
removeAllLabels: ["DELETE /repos/{owner}/{repo}/issues/{issue_number}/labels"],
|
|
17624
|
+
removeAssignees: ["DELETE /repos/{owner}/{repo}/issues/{issue_number}/assignees"],
|
|
17625
|
+
removeDependencyBlockedBy: ["DELETE /repos/{owner}/{repo}/issues/{issue_number}/dependencies/blocked_by/{issue_id}"],
|
|
17626
|
+
removeLabel: ["DELETE /repos/{owner}/{repo}/issues/{issue_number}/labels/{name}"],
|
|
17627
|
+
removeSubIssue: ["DELETE /repos/{owner}/{repo}/issues/{issue_number}/sub_issue"],
|
|
17628
|
+
reprioritizeSubIssue: ["PATCH /repos/{owner}/{repo}/issues/{issue_number}/sub_issues/priority"],
|
|
17629
|
+
setLabels: ["PUT /repos/{owner}/{repo}/issues/{issue_number}/labels"],
|
|
17630
|
+
unlock: ["DELETE /repos/{owner}/{repo}/issues/{issue_number}/lock"],
|
|
17631
|
+
update: ["PATCH /repos/{owner}/{repo}/issues/{issue_number}"],
|
|
17632
|
+
updateComment: ["PATCH /repos/{owner}/{repo}/issues/comments/{comment_id}"],
|
|
17633
|
+
updateLabel: ["PATCH /repos/{owner}/{repo}/labels/{name}"],
|
|
17634
|
+
updateMilestone: ["PATCH /repos/{owner}/{repo}/milestones/{milestone_number}"]
|
|
17635
|
+
},
|
|
17636
|
+
licenses: {
|
|
17637
|
+
get: ["GET /licenses/{license}"],
|
|
17638
|
+
getAllCommonlyUsed: ["GET /licenses"],
|
|
17639
|
+
getForRepo: ["GET /repos/{owner}/{repo}/license"]
|
|
17640
|
+
},
|
|
17641
|
+
markdown: {
|
|
17642
|
+
render: ["POST /markdown"],
|
|
17643
|
+
renderRaw: ["POST /markdown/raw", { headers: { "content-type": "text/plain; charset=utf-8" } }]
|
|
17644
|
+
},
|
|
17645
|
+
meta: {
|
|
17646
|
+
get: ["GET /meta"],
|
|
17647
|
+
getAllVersions: ["GET /versions"],
|
|
17648
|
+
getOctocat: ["GET /octocat"],
|
|
17649
|
+
getZen: ["GET /zen"],
|
|
17650
|
+
root: ["GET /"]
|
|
17651
|
+
},
|
|
17652
|
+
migrations: {
|
|
17653
|
+
deleteArchiveForAuthenticatedUser: ["DELETE /user/migrations/{migration_id}/archive"],
|
|
17654
|
+
deleteArchiveForOrg: ["DELETE /orgs/{org}/migrations/{migration_id}/archive"],
|
|
17655
|
+
downloadArchiveForOrg: ["GET /orgs/{org}/migrations/{migration_id}/archive"],
|
|
17656
|
+
getArchiveForAuthenticatedUser: ["GET /user/migrations/{migration_id}/archive"],
|
|
17657
|
+
getStatusForAuthenticatedUser: ["GET /user/migrations/{migration_id}"],
|
|
17658
|
+
getStatusForOrg: ["GET /orgs/{org}/migrations/{migration_id}"],
|
|
17659
|
+
listForAuthenticatedUser: ["GET /user/migrations"],
|
|
17660
|
+
listForOrg: ["GET /orgs/{org}/migrations"],
|
|
17661
|
+
listReposForAuthenticatedUser: ["GET /user/migrations/{migration_id}/repositories"],
|
|
17662
|
+
listReposForOrg: ["GET /orgs/{org}/migrations/{migration_id}/repositories"],
|
|
17663
|
+
listReposForUser: [
|
|
17664
|
+
"GET /user/migrations/{migration_id}/repositories",
|
|
17665
|
+
{},
|
|
17666
|
+
{ renamed: ["migrations", "listReposForAuthenticatedUser"] }
|
|
17667
|
+
],
|
|
17668
|
+
startForAuthenticatedUser: ["POST /user/migrations"],
|
|
17669
|
+
startForOrg: ["POST /orgs/{org}/migrations"],
|
|
17670
|
+
unlockRepoForAuthenticatedUser: ["DELETE /user/migrations/{migration_id}/repos/{repo_name}/lock"],
|
|
17671
|
+
unlockRepoForOrg: ["DELETE /orgs/{org}/migrations/{migration_id}/repos/{repo_name}/lock"]
|
|
17672
|
+
},
|
|
17673
|
+
oidc: {
|
|
17674
|
+
getOidcCustomSubTemplateForOrg: ["GET /orgs/{org}/actions/oidc/customization/sub"],
|
|
17675
|
+
updateOidcCustomSubTemplateForOrg: ["PUT /orgs/{org}/actions/oidc/customization/sub"]
|
|
17676
|
+
},
|
|
17677
|
+
orgs: {
|
|
17678
|
+
addSecurityManagerTeam: [
|
|
17679
|
+
"PUT /orgs/{org}/security-managers/teams/{team_slug}",
|
|
17680
|
+
{},
|
|
17681
|
+
{ deprecated: "octokit.rest.orgs.addSecurityManagerTeam() is deprecated, see https://docs.github.com/rest/orgs/security-managers#add-a-security-manager-team" }
|
|
17682
|
+
],
|
|
17683
|
+
assignTeamToOrgRole: ["PUT /orgs/{org}/organization-roles/teams/{team_slug}/{role_id}"],
|
|
17684
|
+
assignUserToOrgRole: ["PUT /orgs/{org}/organization-roles/users/{username}/{role_id}"],
|
|
17685
|
+
blockUser: ["PUT /orgs/{org}/blocks/{username}"],
|
|
17686
|
+
cancelInvitation: ["DELETE /orgs/{org}/invitations/{invitation_id}"],
|
|
17687
|
+
checkBlockedUser: ["GET /orgs/{org}/blocks/{username}"],
|
|
17688
|
+
checkMembershipForUser: ["GET /orgs/{org}/members/{username}"],
|
|
17689
|
+
checkPublicMembershipForUser: ["GET /orgs/{org}/public_members/{username}"],
|
|
17690
|
+
convertMemberToOutsideCollaborator: ["PUT /orgs/{org}/outside_collaborators/{username}"],
|
|
17691
|
+
createArtifactStorageRecord: ["POST /orgs/{org}/artifacts/metadata/storage-record"],
|
|
17692
|
+
createInvitation: ["POST /orgs/{org}/invitations"],
|
|
17693
|
+
createIssueType: ["POST /orgs/{org}/issue-types"],
|
|
17694
|
+
createWebhook: ["POST /orgs/{org}/hooks"],
|
|
17695
|
+
customPropertiesForOrgsCreateOrUpdateOrganizationValues: ["PATCH /organizations/{org}/org-properties/values"],
|
|
17696
|
+
customPropertiesForOrgsGetOrganizationValues: ["GET /organizations/{org}/org-properties/values"],
|
|
17697
|
+
customPropertiesForReposCreateOrUpdateOrganizationDefinition: ["PUT /orgs/{org}/properties/schema/{custom_property_name}"],
|
|
17698
|
+
customPropertiesForReposCreateOrUpdateOrganizationDefinitions: ["PATCH /orgs/{org}/properties/schema"],
|
|
17699
|
+
customPropertiesForReposCreateOrUpdateOrganizationValues: ["PATCH /orgs/{org}/properties/values"],
|
|
17700
|
+
customPropertiesForReposDeleteOrganizationDefinition: ["DELETE /orgs/{org}/properties/schema/{custom_property_name}"],
|
|
17701
|
+
customPropertiesForReposGetOrganizationDefinition: ["GET /orgs/{org}/properties/schema/{custom_property_name}"],
|
|
17702
|
+
customPropertiesForReposGetOrganizationDefinitions: ["GET /orgs/{org}/properties/schema"],
|
|
17703
|
+
customPropertiesForReposGetOrganizationValues: ["GET /orgs/{org}/properties/values"],
|
|
17704
|
+
delete: ["DELETE /orgs/{org}"],
|
|
17705
|
+
deleteAttestationsBulk: ["POST /orgs/{org}/attestations/delete-request"],
|
|
17706
|
+
deleteAttestationsById: ["DELETE /orgs/{org}/attestations/{attestation_id}"],
|
|
17707
|
+
deleteAttestationsBySubjectDigest: ["DELETE /orgs/{org}/attestations/digest/{subject_digest}"],
|
|
17708
|
+
deleteIssueType: ["DELETE /orgs/{org}/issue-types/{issue_type_id}"],
|
|
17709
|
+
deleteWebhook: ["DELETE /orgs/{org}/hooks/{hook_id}"],
|
|
17710
|
+
disableSelectedRepositoryImmutableReleasesOrganization: ["DELETE /orgs/{org}/settings/immutable-releases/repositories/{repository_id}"],
|
|
17711
|
+
enableSelectedRepositoryImmutableReleasesOrganization: ["PUT /orgs/{org}/settings/immutable-releases/repositories/{repository_id}"],
|
|
17712
|
+
get: ["GET /orgs/{org}"],
|
|
17713
|
+
getImmutableReleasesSettings: ["GET /orgs/{org}/settings/immutable-releases"],
|
|
17714
|
+
getImmutableReleasesSettingsRepositories: ["GET /orgs/{org}/settings/immutable-releases/repositories"],
|
|
17715
|
+
getMembershipForAuthenticatedUser: ["GET /user/memberships/orgs/{org}"],
|
|
17716
|
+
getMembershipForUser: ["GET /orgs/{org}/memberships/{username}"],
|
|
17717
|
+
getOrgRole: ["GET /orgs/{org}/organization-roles/{role_id}"],
|
|
17718
|
+
getOrgRulesetHistory: ["GET /orgs/{org}/rulesets/{ruleset_id}/history"],
|
|
17719
|
+
getOrgRulesetVersion: ["GET /orgs/{org}/rulesets/{ruleset_id}/history/{version_id}"],
|
|
17720
|
+
getWebhook: ["GET /orgs/{org}/hooks/{hook_id}"],
|
|
17721
|
+
getWebhookConfigForOrg: ["GET /orgs/{org}/hooks/{hook_id}/config"],
|
|
17722
|
+
getWebhookDelivery: ["GET /orgs/{org}/hooks/{hook_id}/deliveries/{delivery_id}"],
|
|
17723
|
+
list: ["GET /organizations"],
|
|
17724
|
+
listAppInstallations: ["GET /orgs/{org}/installations"],
|
|
17725
|
+
listArtifactStorageRecords: ["GET /orgs/{org}/artifacts/{subject_digest}/metadata/storage-records"],
|
|
17726
|
+
listAttestationRepositories: ["GET /orgs/{org}/attestations/repositories"],
|
|
17727
|
+
listAttestations: ["GET /orgs/{org}/attestations/{subject_digest}"],
|
|
17728
|
+
listAttestationsBulk: ["POST /orgs/{org}/attestations/bulk-list{?per_page,before,after}"],
|
|
17729
|
+
listBlockedUsers: ["GET /orgs/{org}/blocks"],
|
|
17730
|
+
listFailedInvitations: ["GET /orgs/{org}/failed_invitations"],
|
|
17731
|
+
listForAuthenticatedUser: ["GET /user/orgs"],
|
|
17732
|
+
listForUser: ["GET /users/{username}/orgs"],
|
|
17733
|
+
listInvitationTeams: ["GET /orgs/{org}/invitations/{invitation_id}/teams"],
|
|
17734
|
+
listIssueTypes: ["GET /orgs/{org}/issue-types"],
|
|
17735
|
+
listMembers: ["GET /orgs/{org}/members"],
|
|
17736
|
+
listMembershipsForAuthenticatedUser: ["GET /user/memberships/orgs"],
|
|
17737
|
+
listOrgRoleTeams: ["GET /orgs/{org}/organization-roles/{role_id}/teams"],
|
|
17738
|
+
listOrgRoleUsers: ["GET /orgs/{org}/organization-roles/{role_id}/users"],
|
|
17739
|
+
listOrgRoles: ["GET /orgs/{org}/organization-roles"],
|
|
17740
|
+
listOrganizationFineGrainedPermissions: ["GET /orgs/{org}/organization-fine-grained-permissions"],
|
|
17741
|
+
listOutsideCollaborators: ["GET /orgs/{org}/outside_collaborators"],
|
|
17742
|
+
listPatGrantRepositories: ["GET /orgs/{org}/personal-access-tokens/{pat_id}/repositories"],
|
|
17743
|
+
listPatGrantRequestRepositories: ["GET /orgs/{org}/personal-access-token-requests/{pat_request_id}/repositories"],
|
|
17744
|
+
listPatGrantRequests: ["GET /orgs/{org}/personal-access-token-requests"],
|
|
17745
|
+
listPatGrants: ["GET /orgs/{org}/personal-access-tokens"],
|
|
17746
|
+
listPendingInvitations: ["GET /orgs/{org}/invitations"],
|
|
17747
|
+
listPublicMembers: ["GET /orgs/{org}/public_members"],
|
|
17748
|
+
listSecurityManagerTeams: [
|
|
17749
|
+
"GET /orgs/{org}/security-managers",
|
|
17750
|
+
{},
|
|
17751
|
+
{ deprecated: "octokit.rest.orgs.listSecurityManagerTeams() is deprecated, see https://docs.github.com/rest/orgs/security-managers#list-security-manager-teams" }
|
|
17752
|
+
],
|
|
17753
|
+
listWebhookDeliveries: ["GET /orgs/{org}/hooks/{hook_id}/deliveries"],
|
|
17754
|
+
listWebhooks: ["GET /orgs/{org}/hooks"],
|
|
17755
|
+
pingWebhook: ["POST /orgs/{org}/hooks/{hook_id}/pings"],
|
|
17756
|
+
redeliverWebhookDelivery: ["POST /orgs/{org}/hooks/{hook_id}/deliveries/{delivery_id}/attempts"],
|
|
17757
|
+
removeMember: ["DELETE /orgs/{org}/members/{username}"],
|
|
17758
|
+
removeMembershipForUser: ["DELETE /orgs/{org}/memberships/{username}"],
|
|
17759
|
+
removeOutsideCollaborator: ["DELETE /orgs/{org}/outside_collaborators/{username}"],
|
|
17760
|
+
removePublicMembershipForAuthenticatedUser: ["DELETE /orgs/{org}/public_members/{username}"],
|
|
17761
|
+
removeSecurityManagerTeam: [
|
|
17762
|
+
"DELETE /orgs/{org}/security-managers/teams/{team_slug}",
|
|
17763
|
+
{},
|
|
17764
|
+
{ deprecated: "octokit.rest.orgs.removeSecurityManagerTeam() is deprecated, see https://docs.github.com/rest/orgs/security-managers#remove-a-security-manager-team" }
|
|
17765
|
+
],
|
|
17766
|
+
reviewPatGrantRequest: ["POST /orgs/{org}/personal-access-token-requests/{pat_request_id}"],
|
|
17767
|
+
reviewPatGrantRequestsInBulk: ["POST /orgs/{org}/personal-access-token-requests"],
|
|
17768
|
+
revokeAllOrgRolesTeam: ["DELETE /orgs/{org}/organization-roles/teams/{team_slug}"],
|
|
17769
|
+
revokeAllOrgRolesUser: ["DELETE /orgs/{org}/organization-roles/users/{username}"],
|
|
17770
|
+
revokeOrgRoleTeam: ["DELETE /orgs/{org}/organization-roles/teams/{team_slug}/{role_id}"],
|
|
17771
|
+
revokeOrgRoleUser: ["DELETE /orgs/{org}/organization-roles/users/{username}/{role_id}"],
|
|
17772
|
+
setImmutableReleasesSettings: ["PUT /orgs/{org}/settings/immutable-releases"],
|
|
17773
|
+
setImmutableReleasesSettingsRepositories: ["PUT /orgs/{org}/settings/immutable-releases/repositories"],
|
|
17774
|
+
setMembershipForUser: ["PUT /orgs/{org}/memberships/{username}"],
|
|
17775
|
+
setPublicMembershipForAuthenticatedUser: ["PUT /orgs/{org}/public_members/{username}"],
|
|
17776
|
+
unblockUser: ["DELETE /orgs/{org}/blocks/{username}"],
|
|
17777
|
+
update: ["PATCH /orgs/{org}"],
|
|
17778
|
+
updateIssueType: ["PUT /orgs/{org}/issue-types/{issue_type_id}"],
|
|
17779
|
+
updateMembershipForAuthenticatedUser: ["PATCH /user/memberships/orgs/{org}"],
|
|
17780
|
+
updatePatAccess: ["POST /orgs/{org}/personal-access-tokens/{pat_id}"],
|
|
17781
|
+
updatePatAccesses: ["POST /orgs/{org}/personal-access-tokens"],
|
|
17782
|
+
updateWebhook: ["PATCH /orgs/{org}/hooks/{hook_id}"],
|
|
17783
|
+
updateWebhookConfigForOrg: ["PATCH /orgs/{org}/hooks/{hook_id}/config"]
|
|
17784
|
+
},
|
|
17785
|
+
packages: {
|
|
17786
|
+
deletePackageForAuthenticatedUser: ["DELETE /user/packages/{package_type}/{package_name}"],
|
|
17787
|
+
deletePackageForOrg: ["DELETE /orgs/{org}/packages/{package_type}/{package_name}"],
|
|
17788
|
+
deletePackageForUser: ["DELETE /users/{username}/packages/{package_type}/{package_name}"],
|
|
17789
|
+
deletePackageVersionForAuthenticatedUser: ["DELETE /user/packages/{package_type}/{package_name}/versions/{package_version_id}"],
|
|
17790
|
+
deletePackageVersionForOrg: ["DELETE /orgs/{org}/packages/{package_type}/{package_name}/versions/{package_version_id}"],
|
|
17791
|
+
deletePackageVersionForUser: ["DELETE /users/{username}/packages/{package_type}/{package_name}/versions/{package_version_id}"],
|
|
17792
|
+
getAllPackageVersionsForAPackageOwnedByAnOrg: [
|
|
17793
|
+
"GET /orgs/{org}/packages/{package_type}/{package_name}/versions",
|
|
17794
|
+
{},
|
|
17795
|
+
{ renamed: ["packages", "getAllPackageVersionsForPackageOwnedByOrg"] }
|
|
17796
|
+
],
|
|
17797
|
+
getAllPackageVersionsForAPackageOwnedByTheAuthenticatedUser: [
|
|
17798
|
+
"GET /user/packages/{package_type}/{package_name}/versions",
|
|
17799
|
+
{},
|
|
17800
|
+
{ renamed: ["packages", "getAllPackageVersionsForPackageOwnedByAuthenticatedUser"] }
|
|
17801
|
+
],
|
|
17802
|
+
getAllPackageVersionsForPackageOwnedByAuthenticatedUser: ["GET /user/packages/{package_type}/{package_name}/versions"],
|
|
17803
|
+
getAllPackageVersionsForPackageOwnedByOrg: ["GET /orgs/{org}/packages/{package_type}/{package_name}/versions"],
|
|
17804
|
+
getAllPackageVersionsForPackageOwnedByUser: ["GET /users/{username}/packages/{package_type}/{package_name}/versions"],
|
|
17805
|
+
getPackageForAuthenticatedUser: ["GET /user/packages/{package_type}/{package_name}"],
|
|
17806
|
+
getPackageForOrganization: ["GET /orgs/{org}/packages/{package_type}/{package_name}"],
|
|
17807
|
+
getPackageForUser: ["GET /users/{username}/packages/{package_type}/{package_name}"],
|
|
17808
|
+
getPackageVersionForAuthenticatedUser: ["GET /user/packages/{package_type}/{package_name}/versions/{package_version_id}"],
|
|
17809
|
+
getPackageVersionForOrganization: ["GET /orgs/{org}/packages/{package_type}/{package_name}/versions/{package_version_id}"],
|
|
17810
|
+
getPackageVersionForUser: ["GET /users/{username}/packages/{package_type}/{package_name}/versions/{package_version_id}"],
|
|
17811
|
+
listDockerMigrationConflictingPackagesForAuthenticatedUser: ["GET /user/docker/conflicts"],
|
|
17812
|
+
listDockerMigrationConflictingPackagesForOrganization: ["GET /orgs/{org}/docker/conflicts"],
|
|
17813
|
+
listDockerMigrationConflictingPackagesForUser: ["GET /users/{username}/docker/conflicts"],
|
|
17814
|
+
listPackagesForAuthenticatedUser: ["GET /user/packages"],
|
|
17815
|
+
listPackagesForOrganization: ["GET /orgs/{org}/packages"],
|
|
17816
|
+
listPackagesForUser: ["GET /users/{username}/packages"],
|
|
17817
|
+
restorePackageForAuthenticatedUser: ["POST /user/packages/{package_type}/{package_name}/restore{?token}"],
|
|
17818
|
+
restorePackageForOrg: ["POST /orgs/{org}/packages/{package_type}/{package_name}/restore{?token}"],
|
|
17819
|
+
restorePackageForUser: ["POST /users/{username}/packages/{package_type}/{package_name}/restore{?token}"],
|
|
17820
|
+
restorePackageVersionForAuthenticatedUser: ["POST /user/packages/{package_type}/{package_name}/versions/{package_version_id}/restore"],
|
|
17821
|
+
restorePackageVersionForOrg: ["POST /orgs/{org}/packages/{package_type}/{package_name}/versions/{package_version_id}/restore"],
|
|
17822
|
+
restorePackageVersionForUser: ["POST /users/{username}/packages/{package_type}/{package_name}/versions/{package_version_id}/restore"]
|
|
17823
|
+
},
|
|
17824
|
+
privateRegistries: {
|
|
17825
|
+
createOrgPrivateRegistry: ["POST /orgs/{org}/private-registries"],
|
|
17826
|
+
deleteOrgPrivateRegistry: ["DELETE /orgs/{org}/private-registries/{secret_name}"],
|
|
17827
|
+
getOrgPrivateRegistry: ["GET /orgs/{org}/private-registries/{secret_name}"],
|
|
17828
|
+
getOrgPublicKey: ["GET /orgs/{org}/private-registries/public-key"],
|
|
17829
|
+
listOrgPrivateRegistries: ["GET /orgs/{org}/private-registries"],
|
|
17830
|
+
updateOrgPrivateRegistry: ["PATCH /orgs/{org}/private-registries/{secret_name}"]
|
|
17831
|
+
},
|
|
17832
|
+
projects: {
|
|
17833
|
+
addItemForOrg: ["POST /orgs/{org}/projectsV2/{project_number}/items"],
|
|
17834
|
+
addItemForUser: ["POST /users/{username}/projectsV2/{project_number}/items"],
|
|
17835
|
+
deleteItemForOrg: ["DELETE /orgs/{org}/projectsV2/{project_number}/items/{item_id}"],
|
|
17836
|
+
deleteItemForUser: ["DELETE /users/{username}/projectsV2/{project_number}/items/{item_id}"],
|
|
17837
|
+
getFieldForOrg: ["GET /orgs/{org}/projectsV2/{project_number}/fields/{field_id}"],
|
|
17838
|
+
getFieldForUser: ["GET /users/{username}/projectsV2/{project_number}/fields/{field_id}"],
|
|
17839
|
+
getForOrg: ["GET /orgs/{org}/projectsV2/{project_number}"],
|
|
17840
|
+
getForUser: ["GET /users/{username}/projectsV2/{project_number}"],
|
|
17841
|
+
getOrgItem: ["GET /orgs/{org}/projectsV2/{project_number}/items/{item_id}"],
|
|
17842
|
+
getUserItem: ["GET /users/{username}/projectsV2/{project_number}/items/{item_id}"],
|
|
17843
|
+
listFieldsForOrg: ["GET /orgs/{org}/projectsV2/{project_number}/fields"],
|
|
17844
|
+
listFieldsForUser: ["GET /users/{username}/projectsV2/{project_number}/fields"],
|
|
17845
|
+
listForOrg: ["GET /orgs/{org}/projectsV2"],
|
|
17846
|
+
listForUser: ["GET /users/{username}/projectsV2"],
|
|
17847
|
+
listItemsForOrg: ["GET /orgs/{org}/projectsV2/{project_number}/items"],
|
|
17848
|
+
listItemsForUser: ["GET /users/{username}/projectsV2/{project_number}/items"],
|
|
17849
|
+
updateItemForOrg: ["PATCH /orgs/{org}/projectsV2/{project_number}/items/{item_id}"],
|
|
17850
|
+
updateItemForUser: ["PATCH /users/{username}/projectsV2/{project_number}/items/{item_id}"]
|
|
17851
|
+
},
|
|
17852
|
+
pulls: {
|
|
17853
|
+
checkIfMerged: ["GET /repos/{owner}/{repo}/pulls/{pull_number}/merge"],
|
|
17854
|
+
create: ["POST /repos/{owner}/{repo}/pulls"],
|
|
17855
|
+
createReplyForReviewComment: ["POST /repos/{owner}/{repo}/pulls/{pull_number}/comments/{comment_id}/replies"],
|
|
17856
|
+
createReview: ["POST /repos/{owner}/{repo}/pulls/{pull_number}/reviews"],
|
|
17857
|
+
createReviewComment: ["POST /repos/{owner}/{repo}/pulls/{pull_number}/comments"],
|
|
17858
|
+
deletePendingReview: ["DELETE /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}"],
|
|
17859
|
+
deleteReviewComment: ["DELETE /repos/{owner}/{repo}/pulls/comments/{comment_id}"],
|
|
17860
|
+
dismissReview: ["PUT /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/dismissals"],
|
|
17861
|
+
get: ["GET /repos/{owner}/{repo}/pulls/{pull_number}"],
|
|
17862
|
+
getReview: ["GET /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}"],
|
|
17863
|
+
getReviewComment: ["GET /repos/{owner}/{repo}/pulls/comments/{comment_id}"],
|
|
17864
|
+
list: ["GET /repos/{owner}/{repo}/pulls"],
|
|
17865
|
+
listCommentsForReview: ["GET /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/comments"],
|
|
17866
|
+
listCommits: ["GET /repos/{owner}/{repo}/pulls/{pull_number}/commits"],
|
|
17867
|
+
listFiles: ["GET /repos/{owner}/{repo}/pulls/{pull_number}/files"],
|
|
17868
|
+
listRequestedReviewers: ["GET /repos/{owner}/{repo}/pulls/{pull_number}/requested_reviewers"],
|
|
17869
|
+
listReviewComments: ["GET /repos/{owner}/{repo}/pulls/{pull_number}/comments"],
|
|
17870
|
+
listReviewCommentsForRepo: ["GET /repos/{owner}/{repo}/pulls/comments"],
|
|
17871
|
+
listReviews: ["GET /repos/{owner}/{repo}/pulls/{pull_number}/reviews"],
|
|
17872
|
+
merge: ["PUT /repos/{owner}/{repo}/pulls/{pull_number}/merge"],
|
|
17873
|
+
removeRequestedReviewers: ["DELETE /repos/{owner}/{repo}/pulls/{pull_number}/requested_reviewers"],
|
|
17874
|
+
requestReviewers: ["POST /repos/{owner}/{repo}/pulls/{pull_number}/requested_reviewers"],
|
|
17875
|
+
submitReview: ["POST /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/events"],
|
|
17876
|
+
update: ["PATCH /repos/{owner}/{repo}/pulls/{pull_number}"],
|
|
17877
|
+
updateBranch: ["PUT /repos/{owner}/{repo}/pulls/{pull_number}/update-branch"],
|
|
17878
|
+
updateReview: ["PUT /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}"],
|
|
17879
|
+
updateReviewComment: ["PATCH /repos/{owner}/{repo}/pulls/comments/{comment_id}"]
|
|
17880
|
+
},
|
|
17881
|
+
rateLimit: { get: ["GET /rate_limit"] },
|
|
17882
|
+
reactions: {
|
|
17883
|
+
createForCommitComment: ["POST /repos/{owner}/{repo}/comments/{comment_id}/reactions"],
|
|
17884
|
+
createForIssue: ["POST /repos/{owner}/{repo}/issues/{issue_number}/reactions"],
|
|
17885
|
+
createForIssueComment: ["POST /repos/{owner}/{repo}/issues/comments/{comment_id}/reactions"],
|
|
17886
|
+
createForPullRequestReviewComment: ["POST /repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions"],
|
|
17887
|
+
createForRelease: ["POST /repos/{owner}/{repo}/releases/{release_id}/reactions"],
|
|
17888
|
+
createForTeamDiscussionCommentInOrg: ["POST /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions"],
|
|
17889
|
+
createForTeamDiscussionInOrg: ["POST /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/reactions"],
|
|
17890
|
+
deleteForCommitComment: ["DELETE /repos/{owner}/{repo}/comments/{comment_id}/reactions/{reaction_id}"],
|
|
17891
|
+
deleteForIssue: ["DELETE /repos/{owner}/{repo}/issues/{issue_number}/reactions/{reaction_id}"],
|
|
17892
|
+
deleteForIssueComment: ["DELETE /repos/{owner}/{repo}/issues/comments/{comment_id}/reactions/{reaction_id}"],
|
|
17893
|
+
deleteForPullRequestComment: ["DELETE /repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions/{reaction_id}"],
|
|
17894
|
+
deleteForRelease: ["DELETE /repos/{owner}/{repo}/releases/{release_id}/reactions/{reaction_id}"],
|
|
17895
|
+
deleteForTeamDiscussion: ["DELETE /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/reactions/{reaction_id}"],
|
|
17896
|
+
deleteForTeamDiscussionComment: ["DELETE /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions/{reaction_id}"],
|
|
17897
|
+
listForCommitComment: ["GET /repos/{owner}/{repo}/comments/{comment_id}/reactions"],
|
|
17898
|
+
listForIssue: ["GET /repos/{owner}/{repo}/issues/{issue_number}/reactions"],
|
|
17899
|
+
listForIssueComment: ["GET /repos/{owner}/{repo}/issues/comments/{comment_id}/reactions"],
|
|
17900
|
+
listForPullRequestReviewComment: ["GET /repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions"],
|
|
17901
|
+
listForRelease: ["GET /repos/{owner}/{repo}/releases/{release_id}/reactions"],
|
|
17902
|
+
listForTeamDiscussionCommentInOrg: ["GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions"],
|
|
17903
|
+
listForTeamDiscussionInOrg: ["GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/reactions"]
|
|
17904
|
+
},
|
|
17905
|
+
repos: {
|
|
17906
|
+
acceptInvitation: [
|
|
17907
|
+
"PATCH /user/repository_invitations/{invitation_id}",
|
|
17908
|
+
{},
|
|
17909
|
+
{ renamed: ["repos", "acceptInvitationForAuthenticatedUser"] }
|
|
17910
|
+
],
|
|
17911
|
+
acceptInvitationForAuthenticatedUser: ["PATCH /user/repository_invitations/{invitation_id}"],
|
|
17912
|
+
addAppAccessRestrictions: [
|
|
17913
|
+
"POST /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps",
|
|
17914
|
+
{},
|
|
17915
|
+
{ mapToData: "apps" }
|
|
17916
|
+
],
|
|
17917
|
+
addCollaborator: ["PUT /repos/{owner}/{repo}/collaborators/{username}"],
|
|
17918
|
+
addStatusCheckContexts: [
|
|
17919
|
+
"POST /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts",
|
|
17920
|
+
{},
|
|
17921
|
+
{ mapToData: "contexts" }
|
|
17922
|
+
],
|
|
17923
|
+
addTeamAccessRestrictions: [
|
|
17924
|
+
"POST /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams",
|
|
17925
|
+
{},
|
|
17926
|
+
{ mapToData: "teams" }
|
|
17927
|
+
],
|
|
17928
|
+
addUserAccessRestrictions: [
|
|
17929
|
+
"POST /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users",
|
|
17930
|
+
{},
|
|
17931
|
+
{ mapToData: "users" }
|
|
17932
|
+
],
|
|
17933
|
+
cancelPagesDeployment: ["POST /repos/{owner}/{repo}/pages/deployments/{pages_deployment_id}/cancel"],
|
|
17934
|
+
checkAutomatedSecurityFixes: ["GET /repos/{owner}/{repo}/automated-security-fixes"],
|
|
17935
|
+
checkCollaborator: ["GET /repos/{owner}/{repo}/collaborators/{username}"],
|
|
17936
|
+
checkImmutableReleases: ["GET /repos/{owner}/{repo}/immutable-releases"],
|
|
17937
|
+
checkPrivateVulnerabilityReporting: ["GET /repos/{owner}/{repo}/private-vulnerability-reporting"],
|
|
17938
|
+
checkVulnerabilityAlerts: ["GET /repos/{owner}/{repo}/vulnerability-alerts"],
|
|
17939
|
+
codeownersErrors: ["GET /repos/{owner}/{repo}/codeowners/errors"],
|
|
17940
|
+
compareCommits: ["GET /repos/{owner}/{repo}/compare/{base}...{head}"],
|
|
17941
|
+
compareCommitsWithBasehead: ["GET /repos/{owner}/{repo}/compare/{basehead}"],
|
|
17942
|
+
createAttestation: ["POST /repos/{owner}/{repo}/attestations"],
|
|
17943
|
+
createAutolink: ["POST /repos/{owner}/{repo}/autolinks"],
|
|
17944
|
+
createCommitComment: ["POST /repos/{owner}/{repo}/commits/{commit_sha}/comments"],
|
|
17945
|
+
createCommitSignatureProtection: ["POST /repos/{owner}/{repo}/branches/{branch}/protection/required_signatures"],
|
|
17946
|
+
createCommitStatus: ["POST /repos/{owner}/{repo}/statuses/{sha}"],
|
|
17947
|
+
createDeployKey: ["POST /repos/{owner}/{repo}/keys"],
|
|
17948
|
+
createDeployment: ["POST /repos/{owner}/{repo}/deployments"],
|
|
17949
|
+
createDeploymentBranchPolicy: ["POST /repos/{owner}/{repo}/environments/{environment_name}/deployment-branch-policies"],
|
|
17950
|
+
createDeploymentProtectionRule: ["POST /repos/{owner}/{repo}/environments/{environment_name}/deployment_protection_rules"],
|
|
17951
|
+
createDeploymentStatus: ["POST /repos/{owner}/{repo}/deployments/{deployment_id}/statuses"],
|
|
17952
|
+
createDispatchEvent: ["POST /repos/{owner}/{repo}/dispatches"],
|
|
17953
|
+
createForAuthenticatedUser: ["POST /user/repos"],
|
|
17954
|
+
createFork: ["POST /repos/{owner}/{repo}/forks"],
|
|
17955
|
+
createInOrg: ["POST /orgs/{org}/repos"],
|
|
17956
|
+
createOrUpdateEnvironment: ["PUT /repos/{owner}/{repo}/environments/{environment_name}"],
|
|
17957
|
+
createOrUpdateFileContents: ["PUT /repos/{owner}/{repo}/contents/{path}"],
|
|
17958
|
+
createOrgRuleset: ["POST /orgs/{org}/rulesets"],
|
|
17959
|
+
createPagesDeployment: ["POST /repos/{owner}/{repo}/pages/deployments"],
|
|
17960
|
+
createPagesSite: ["POST /repos/{owner}/{repo}/pages"],
|
|
17961
|
+
createRelease: ["POST /repos/{owner}/{repo}/releases"],
|
|
17962
|
+
createRepoRuleset: ["POST /repos/{owner}/{repo}/rulesets"],
|
|
17963
|
+
createUsingTemplate: ["POST /repos/{template_owner}/{template_repo}/generate"],
|
|
17964
|
+
createWebhook: ["POST /repos/{owner}/{repo}/hooks"],
|
|
17965
|
+
customPropertiesForReposCreateOrUpdateRepositoryValues: ["PATCH /repos/{owner}/{repo}/properties/values"],
|
|
17966
|
+
customPropertiesForReposGetRepositoryValues: ["GET /repos/{owner}/{repo}/properties/values"],
|
|
17967
|
+
declineInvitation: [
|
|
17968
|
+
"DELETE /user/repository_invitations/{invitation_id}",
|
|
17969
|
+
{},
|
|
17970
|
+
{ renamed: ["repos", "declineInvitationForAuthenticatedUser"] }
|
|
17971
|
+
],
|
|
17972
|
+
declineInvitationForAuthenticatedUser: ["DELETE /user/repository_invitations/{invitation_id}"],
|
|
17973
|
+
delete: ["DELETE /repos/{owner}/{repo}"],
|
|
17974
|
+
deleteAccessRestrictions: ["DELETE /repos/{owner}/{repo}/branches/{branch}/protection/restrictions"],
|
|
17975
|
+
deleteAdminBranchProtection: ["DELETE /repos/{owner}/{repo}/branches/{branch}/protection/enforce_admins"],
|
|
17976
|
+
deleteAnEnvironment: ["DELETE /repos/{owner}/{repo}/environments/{environment_name}"],
|
|
17977
|
+
deleteAutolink: ["DELETE /repos/{owner}/{repo}/autolinks/{autolink_id}"],
|
|
17978
|
+
deleteBranchProtection: ["DELETE /repos/{owner}/{repo}/branches/{branch}/protection"],
|
|
17979
|
+
deleteCommitComment: ["DELETE /repos/{owner}/{repo}/comments/{comment_id}"],
|
|
17980
|
+
deleteCommitSignatureProtection: ["DELETE /repos/{owner}/{repo}/branches/{branch}/protection/required_signatures"],
|
|
17981
|
+
deleteDeployKey: ["DELETE /repos/{owner}/{repo}/keys/{key_id}"],
|
|
17982
|
+
deleteDeployment: ["DELETE /repos/{owner}/{repo}/deployments/{deployment_id}"],
|
|
17983
|
+
deleteDeploymentBranchPolicy: ["DELETE /repos/{owner}/{repo}/environments/{environment_name}/deployment-branch-policies/{branch_policy_id}"],
|
|
17984
|
+
deleteFile: ["DELETE /repos/{owner}/{repo}/contents/{path}"],
|
|
17985
|
+
deleteInvitation: ["DELETE /repos/{owner}/{repo}/invitations/{invitation_id}"],
|
|
17986
|
+
deleteOrgRuleset: ["DELETE /orgs/{org}/rulesets/{ruleset_id}"],
|
|
17987
|
+
deletePagesSite: ["DELETE /repos/{owner}/{repo}/pages"],
|
|
17988
|
+
deletePullRequestReviewProtection: ["DELETE /repos/{owner}/{repo}/branches/{branch}/protection/required_pull_request_reviews"],
|
|
17989
|
+
deleteRelease: ["DELETE /repos/{owner}/{repo}/releases/{release_id}"],
|
|
17990
|
+
deleteReleaseAsset: ["DELETE /repos/{owner}/{repo}/releases/assets/{asset_id}"],
|
|
17991
|
+
deleteRepoRuleset: ["DELETE /repos/{owner}/{repo}/rulesets/{ruleset_id}"],
|
|
17992
|
+
deleteWebhook: ["DELETE /repos/{owner}/{repo}/hooks/{hook_id}"],
|
|
17993
|
+
disableAutomatedSecurityFixes: ["DELETE /repos/{owner}/{repo}/automated-security-fixes"],
|
|
17994
|
+
disableDeploymentProtectionRule: ["DELETE /repos/{owner}/{repo}/environments/{environment_name}/deployment_protection_rules/{protection_rule_id}"],
|
|
17995
|
+
disableImmutableReleases: ["DELETE /repos/{owner}/{repo}/immutable-releases"],
|
|
17996
|
+
disablePrivateVulnerabilityReporting: ["DELETE /repos/{owner}/{repo}/private-vulnerability-reporting"],
|
|
17997
|
+
disableVulnerabilityAlerts: ["DELETE /repos/{owner}/{repo}/vulnerability-alerts"],
|
|
17998
|
+
downloadArchive: [
|
|
17999
|
+
"GET /repos/{owner}/{repo}/zipball/{ref}",
|
|
18000
|
+
{},
|
|
18001
|
+
{ renamed: ["repos", "downloadZipballArchive"] }
|
|
18002
|
+
],
|
|
18003
|
+
downloadTarballArchive: ["GET /repos/{owner}/{repo}/tarball/{ref}"],
|
|
18004
|
+
downloadZipballArchive: ["GET /repos/{owner}/{repo}/zipball/{ref}"],
|
|
18005
|
+
enableAutomatedSecurityFixes: ["PUT /repos/{owner}/{repo}/automated-security-fixes"],
|
|
18006
|
+
enableImmutableReleases: ["PUT /repos/{owner}/{repo}/immutable-releases"],
|
|
18007
|
+
enablePrivateVulnerabilityReporting: ["PUT /repos/{owner}/{repo}/private-vulnerability-reporting"],
|
|
18008
|
+
enableVulnerabilityAlerts: ["PUT /repos/{owner}/{repo}/vulnerability-alerts"],
|
|
18009
|
+
generateReleaseNotes: ["POST /repos/{owner}/{repo}/releases/generate-notes"],
|
|
18010
|
+
get: ["GET /repos/{owner}/{repo}"],
|
|
18011
|
+
getAccessRestrictions: ["GET /repos/{owner}/{repo}/branches/{branch}/protection/restrictions"],
|
|
18012
|
+
getAdminBranchProtection: ["GET /repos/{owner}/{repo}/branches/{branch}/protection/enforce_admins"],
|
|
18013
|
+
getAllDeploymentProtectionRules: ["GET /repos/{owner}/{repo}/environments/{environment_name}/deployment_protection_rules"],
|
|
18014
|
+
getAllEnvironments: ["GET /repos/{owner}/{repo}/environments"],
|
|
18015
|
+
getAllStatusCheckContexts: ["GET /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts"],
|
|
18016
|
+
getAllTopics: ["GET /repos/{owner}/{repo}/topics"],
|
|
18017
|
+
getAppsWithAccessToProtectedBranch: ["GET /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps"],
|
|
18018
|
+
getAutolink: ["GET /repos/{owner}/{repo}/autolinks/{autolink_id}"],
|
|
18019
|
+
getBranch: ["GET /repos/{owner}/{repo}/branches/{branch}"],
|
|
18020
|
+
getBranchProtection: ["GET /repos/{owner}/{repo}/branches/{branch}/protection"],
|
|
18021
|
+
getBranchRules: ["GET /repos/{owner}/{repo}/rules/branches/{branch}"],
|
|
18022
|
+
getClones: ["GET /repos/{owner}/{repo}/traffic/clones"],
|
|
18023
|
+
getCodeFrequencyStats: ["GET /repos/{owner}/{repo}/stats/code_frequency"],
|
|
18024
|
+
getCollaboratorPermissionLevel: ["GET /repos/{owner}/{repo}/collaborators/{username}/permission"],
|
|
18025
|
+
getCombinedStatusForRef: ["GET /repos/{owner}/{repo}/commits/{ref}/status"],
|
|
18026
|
+
getCommit: ["GET /repos/{owner}/{repo}/commits/{ref}"],
|
|
18027
|
+
getCommitActivityStats: ["GET /repos/{owner}/{repo}/stats/commit_activity"],
|
|
18028
|
+
getCommitComment: ["GET /repos/{owner}/{repo}/comments/{comment_id}"],
|
|
18029
|
+
getCommitSignatureProtection: ["GET /repos/{owner}/{repo}/branches/{branch}/protection/required_signatures"],
|
|
18030
|
+
getCommunityProfileMetrics: ["GET /repos/{owner}/{repo}/community/profile"],
|
|
18031
|
+
getContent: ["GET /repos/{owner}/{repo}/contents/{path}"],
|
|
18032
|
+
getContributorsStats: ["GET /repos/{owner}/{repo}/stats/contributors"],
|
|
18033
|
+
getCustomDeploymentProtectionRule: ["GET /repos/{owner}/{repo}/environments/{environment_name}/deployment_protection_rules/{protection_rule_id}"],
|
|
18034
|
+
getDeployKey: ["GET /repos/{owner}/{repo}/keys/{key_id}"],
|
|
18035
|
+
getDeployment: ["GET /repos/{owner}/{repo}/deployments/{deployment_id}"],
|
|
18036
|
+
getDeploymentBranchPolicy: ["GET /repos/{owner}/{repo}/environments/{environment_name}/deployment-branch-policies/{branch_policy_id}"],
|
|
18037
|
+
getDeploymentStatus: ["GET /repos/{owner}/{repo}/deployments/{deployment_id}/statuses/{status_id}"],
|
|
18038
|
+
getEnvironment: ["GET /repos/{owner}/{repo}/environments/{environment_name}"],
|
|
18039
|
+
getLatestPagesBuild: ["GET /repos/{owner}/{repo}/pages/builds/latest"],
|
|
18040
|
+
getLatestRelease: ["GET /repos/{owner}/{repo}/releases/latest"],
|
|
18041
|
+
getOrgRuleSuite: ["GET /orgs/{org}/rulesets/rule-suites/{rule_suite_id}"],
|
|
18042
|
+
getOrgRuleSuites: ["GET /orgs/{org}/rulesets/rule-suites"],
|
|
18043
|
+
getOrgRuleset: ["GET /orgs/{org}/rulesets/{ruleset_id}"],
|
|
18044
|
+
getOrgRulesets: ["GET /orgs/{org}/rulesets"],
|
|
18045
|
+
getPages: ["GET /repos/{owner}/{repo}/pages"],
|
|
18046
|
+
getPagesBuild: ["GET /repos/{owner}/{repo}/pages/builds/{build_id}"],
|
|
18047
|
+
getPagesDeployment: ["GET /repos/{owner}/{repo}/pages/deployments/{pages_deployment_id}"],
|
|
18048
|
+
getPagesHealthCheck: ["GET /repos/{owner}/{repo}/pages/health"],
|
|
18049
|
+
getParticipationStats: ["GET /repos/{owner}/{repo}/stats/participation"],
|
|
18050
|
+
getPullRequestReviewProtection: ["GET /repos/{owner}/{repo}/branches/{branch}/protection/required_pull_request_reviews"],
|
|
18051
|
+
getPunchCardStats: ["GET /repos/{owner}/{repo}/stats/punch_card"],
|
|
18052
|
+
getReadme: ["GET /repos/{owner}/{repo}/readme"],
|
|
18053
|
+
getReadmeInDirectory: ["GET /repos/{owner}/{repo}/readme/{dir}"],
|
|
18054
|
+
getRelease: ["GET /repos/{owner}/{repo}/releases/{release_id}"],
|
|
18055
|
+
getReleaseAsset: ["GET /repos/{owner}/{repo}/releases/assets/{asset_id}"],
|
|
18056
|
+
getReleaseByTag: ["GET /repos/{owner}/{repo}/releases/tags/{tag}"],
|
|
18057
|
+
getRepoRuleSuite: ["GET /repos/{owner}/{repo}/rulesets/rule-suites/{rule_suite_id}"],
|
|
18058
|
+
getRepoRuleSuites: ["GET /repos/{owner}/{repo}/rulesets/rule-suites"],
|
|
18059
|
+
getRepoRuleset: ["GET /repos/{owner}/{repo}/rulesets/{ruleset_id}"],
|
|
18060
|
+
getRepoRulesetHistory: ["GET /repos/{owner}/{repo}/rulesets/{ruleset_id}/history"],
|
|
18061
|
+
getRepoRulesetVersion: ["GET /repos/{owner}/{repo}/rulesets/{ruleset_id}/history/{version_id}"],
|
|
18062
|
+
getRepoRulesets: ["GET /repos/{owner}/{repo}/rulesets"],
|
|
18063
|
+
getStatusChecksProtection: ["GET /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks"],
|
|
18064
|
+
getTeamsWithAccessToProtectedBranch: ["GET /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams"],
|
|
18065
|
+
getTopPaths: ["GET /repos/{owner}/{repo}/traffic/popular/paths"],
|
|
18066
|
+
getTopReferrers: ["GET /repos/{owner}/{repo}/traffic/popular/referrers"],
|
|
18067
|
+
getUsersWithAccessToProtectedBranch: ["GET /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users"],
|
|
18068
|
+
getViews: ["GET /repos/{owner}/{repo}/traffic/views"],
|
|
18069
|
+
getWebhook: ["GET /repos/{owner}/{repo}/hooks/{hook_id}"],
|
|
18070
|
+
getWebhookConfigForRepo: ["GET /repos/{owner}/{repo}/hooks/{hook_id}/config"],
|
|
18071
|
+
getWebhookDelivery: ["GET /repos/{owner}/{repo}/hooks/{hook_id}/deliveries/{delivery_id}"],
|
|
18072
|
+
listActivities: ["GET /repos/{owner}/{repo}/activity"],
|
|
18073
|
+
listAttestations: ["GET /repos/{owner}/{repo}/attestations/{subject_digest}"],
|
|
18074
|
+
listAutolinks: ["GET /repos/{owner}/{repo}/autolinks"],
|
|
18075
|
+
listBranches: ["GET /repos/{owner}/{repo}/branches"],
|
|
18076
|
+
listBranchesForHeadCommit: ["GET /repos/{owner}/{repo}/commits/{commit_sha}/branches-where-head"],
|
|
18077
|
+
listCollaborators: ["GET /repos/{owner}/{repo}/collaborators"],
|
|
18078
|
+
listCommentsForCommit: ["GET /repos/{owner}/{repo}/commits/{commit_sha}/comments"],
|
|
18079
|
+
listCommitCommentsForRepo: ["GET /repos/{owner}/{repo}/comments"],
|
|
18080
|
+
listCommitStatusesForRef: ["GET /repos/{owner}/{repo}/commits/{ref}/statuses"],
|
|
18081
|
+
listCommits: ["GET /repos/{owner}/{repo}/commits"],
|
|
18082
|
+
listContributors: ["GET /repos/{owner}/{repo}/contributors"],
|
|
18083
|
+
listCustomDeploymentRuleIntegrations: ["GET /repos/{owner}/{repo}/environments/{environment_name}/deployment_protection_rules/apps"],
|
|
18084
|
+
listDeployKeys: ["GET /repos/{owner}/{repo}/keys"],
|
|
18085
|
+
listDeploymentBranchPolicies: ["GET /repos/{owner}/{repo}/environments/{environment_name}/deployment-branch-policies"],
|
|
18086
|
+
listDeploymentStatuses: ["GET /repos/{owner}/{repo}/deployments/{deployment_id}/statuses"],
|
|
18087
|
+
listDeployments: ["GET /repos/{owner}/{repo}/deployments"],
|
|
18088
|
+
listForAuthenticatedUser: ["GET /user/repos"],
|
|
18089
|
+
listForOrg: ["GET /orgs/{org}/repos"],
|
|
18090
|
+
listForUser: ["GET /users/{username}/repos"],
|
|
18091
|
+
listForks: ["GET /repos/{owner}/{repo}/forks"],
|
|
18092
|
+
listInvitations: ["GET /repos/{owner}/{repo}/invitations"],
|
|
18093
|
+
listInvitationsForAuthenticatedUser: ["GET /user/repository_invitations"],
|
|
18094
|
+
listLanguages: ["GET /repos/{owner}/{repo}/languages"],
|
|
18095
|
+
listPagesBuilds: ["GET /repos/{owner}/{repo}/pages/builds"],
|
|
18096
|
+
listPublic: ["GET /repositories"],
|
|
18097
|
+
listPullRequestsAssociatedWithCommit: ["GET /repos/{owner}/{repo}/commits/{commit_sha}/pulls"],
|
|
18098
|
+
listReleaseAssets: ["GET /repos/{owner}/{repo}/releases/{release_id}/assets"],
|
|
18099
|
+
listReleases: ["GET /repos/{owner}/{repo}/releases"],
|
|
18100
|
+
listTags: ["GET /repos/{owner}/{repo}/tags"],
|
|
18101
|
+
listTeams: ["GET /repos/{owner}/{repo}/teams"],
|
|
18102
|
+
listWebhookDeliveries: ["GET /repos/{owner}/{repo}/hooks/{hook_id}/deliveries"],
|
|
18103
|
+
listWebhooks: ["GET /repos/{owner}/{repo}/hooks"],
|
|
18104
|
+
merge: ["POST /repos/{owner}/{repo}/merges"],
|
|
18105
|
+
mergeUpstream: ["POST /repos/{owner}/{repo}/merge-upstream"],
|
|
18106
|
+
pingWebhook: ["POST /repos/{owner}/{repo}/hooks/{hook_id}/pings"],
|
|
18107
|
+
redeliverWebhookDelivery: ["POST /repos/{owner}/{repo}/hooks/{hook_id}/deliveries/{delivery_id}/attempts"],
|
|
18108
|
+
removeAppAccessRestrictions: [
|
|
18109
|
+
"DELETE /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps",
|
|
18110
|
+
{},
|
|
18111
|
+
{ mapToData: "apps" }
|
|
18112
|
+
],
|
|
18113
|
+
removeCollaborator: ["DELETE /repos/{owner}/{repo}/collaborators/{username}"],
|
|
18114
|
+
removeStatusCheckContexts: [
|
|
18115
|
+
"DELETE /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts",
|
|
18116
|
+
{},
|
|
18117
|
+
{ mapToData: "contexts" }
|
|
18118
|
+
],
|
|
18119
|
+
removeStatusCheckProtection: ["DELETE /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks"],
|
|
18120
|
+
removeTeamAccessRestrictions: [
|
|
18121
|
+
"DELETE /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams",
|
|
18122
|
+
{},
|
|
18123
|
+
{ mapToData: "teams" }
|
|
18124
|
+
],
|
|
18125
|
+
removeUserAccessRestrictions: [
|
|
18126
|
+
"DELETE /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users",
|
|
18127
|
+
{},
|
|
18128
|
+
{ mapToData: "users" }
|
|
18129
|
+
],
|
|
18130
|
+
renameBranch: ["POST /repos/{owner}/{repo}/branches/{branch}/rename"],
|
|
18131
|
+
replaceAllTopics: ["PUT /repos/{owner}/{repo}/topics"],
|
|
18132
|
+
requestPagesBuild: ["POST /repos/{owner}/{repo}/pages/builds"],
|
|
18133
|
+
setAdminBranchProtection: ["POST /repos/{owner}/{repo}/branches/{branch}/protection/enforce_admins"],
|
|
18134
|
+
setAppAccessRestrictions: [
|
|
18135
|
+
"PUT /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps",
|
|
18136
|
+
{},
|
|
18137
|
+
{ mapToData: "apps" }
|
|
18138
|
+
],
|
|
18139
|
+
setStatusCheckContexts: [
|
|
18140
|
+
"PUT /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts",
|
|
18141
|
+
{},
|
|
18142
|
+
{ mapToData: "contexts" }
|
|
18143
|
+
],
|
|
18144
|
+
setTeamAccessRestrictions: [
|
|
18145
|
+
"PUT /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams",
|
|
18146
|
+
{},
|
|
18147
|
+
{ mapToData: "teams" }
|
|
18148
|
+
],
|
|
18149
|
+
setUserAccessRestrictions: [
|
|
18150
|
+
"PUT /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users",
|
|
18151
|
+
{},
|
|
18152
|
+
{ mapToData: "users" }
|
|
18153
|
+
],
|
|
18154
|
+
testPushWebhook: ["POST /repos/{owner}/{repo}/hooks/{hook_id}/tests"],
|
|
18155
|
+
transfer: ["POST /repos/{owner}/{repo}/transfer"],
|
|
18156
|
+
update: ["PATCH /repos/{owner}/{repo}"],
|
|
18157
|
+
updateBranchProtection: ["PUT /repos/{owner}/{repo}/branches/{branch}/protection"],
|
|
18158
|
+
updateCommitComment: ["PATCH /repos/{owner}/{repo}/comments/{comment_id}"],
|
|
18159
|
+
updateDeploymentBranchPolicy: ["PUT /repos/{owner}/{repo}/environments/{environment_name}/deployment-branch-policies/{branch_policy_id}"],
|
|
18160
|
+
updateInformationAboutPagesSite: ["PUT /repos/{owner}/{repo}/pages"],
|
|
18161
|
+
updateInvitation: ["PATCH /repos/{owner}/{repo}/invitations/{invitation_id}"],
|
|
18162
|
+
updateOrgRuleset: ["PUT /orgs/{org}/rulesets/{ruleset_id}"],
|
|
18163
|
+
updatePullRequestReviewProtection: ["PATCH /repos/{owner}/{repo}/branches/{branch}/protection/required_pull_request_reviews"],
|
|
18164
|
+
updateRelease: ["PATCH /repos/{owner}/{repo}/releases/{release_id}"],
|
|
18165
|
+
updateReleaseAsset: ["PATCH /repos/{owner}/{repo}/releases/assets/{asset_id}"],
|
|
18166
|
+
updateRepoRuleset: ["PUT /repos/{owner}/{repo}/rulesets/{ruleset_id}"],
|
|
18167
|
+
updateStatusCheckPotection: [
|
|
18168
|
+
"PATCH /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks",
|
|
18169
|
+
{},
|
|
18170
|
+
{ renamed: ["repos", "updateStatusCheckProtection"] }
|
|
18171
|
+
],
|
|
18172
|
+
updateStatusCheckProtection: ["PATCH /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks"],
|
|
18173
|
+
updateWebhook: ["PATCH /repos/{owner}/{repo}/hooks/{hook_id}"],
|
|
18174
|
+
updateWebhookConfigForRepo: ["PATCH /repos/{owner}/{repo}/hooks/{hook_id}/config"],
|
|
18175
|
+
uploadReleaseAsset: ["POST /repos/{owner}/{repo}/releases/{release_id}/assets{?name,label}", { baseUrl: "https://uploads.github.com" }]
|
|
18176
|
+
},
|
|
18177
|
+
search: {
|
|
18178
|
+
code: ["GET /search/code"],
|
|
18179
|
+
commits: ["GET /search/commits"],
|
|
18180
|
+
issuesAndPullRequests: ["GET /search/issues"],
|
|
18181
|
+
labels: ["GET /search/labels"],
|
|
18182
|
+
repos: ["GET /search/repositories"],
|
|
18183
|
+
topics: ["GET /search/topics"],
|
|
18184
|
+
users: ["GET /search/users"]
|
|
18185
|
+
},
|
|
18186
|
+
secretScanning: {
|
|
18187
|
+
createPushProtectionBypass: ["POST /repos/{owner}/{repo}/secret-scanning/push-protection-bypasses"],
|
|
18188
|
+
getAlert: ["GET /repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}"],
|
|
18189
|
+
getScanHistory: ["GET /repos/{owner}/{repo}/secret-scanning/scan-history"],
|
|
18190
|
+
listAlertsForOrg: ["GET /orgs/{org}/secret-scanning/alerts"],
|
|
18191
|
+
listAlertsForRepo: ["GET /repos/{owner}/{repo}/secret-scanning/alerts"],
|
|
18192
|
+
listLocationsForAlert: ["GET /repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}/locations"],
|
|
18193
|
+
listOrgPatternConfigs: ["GET /orgs/{org}/secret-scanning/pattern-configurations"],
|
|
18194
|
+
updateAlert: ["PATCH /repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}"],
|
|
18195
|
+
updateOrgPatternConfigs: ["PATCH /orgs/{org}/secret-scanning/pattern-configurations"]
|
|
18196
|
+
},
|
|
18197
|
+
securityAdvisories: {
|
|
18198
|
+
createFork: ["POST /repos/{owner}/{repo}/security-advisories/{ghsa_id}/forks"],
|
|
18199
|
+
createPrivateVulnerabilityReport: ["POST /repos/{owner}/{repo}/security-advisories/reports"],
|
|
18200
|
+
createRepositoryAdvisory: ["POST /repos/{owner}/{repo}/security-advisories"],
|
|
18201
|
+
createRepositoryAdvisoryCveRequest: ["POST /repos/{owner}/{repo}/security-advisories/{ghsa_id}/cve"],
|
|
18202
|
+
getGlobalAdvisory: ["GET /advisories/{ghsa_id}"],
|
|
18203
|
+
getRepositoryAdvisory: ["GET /repos/{owner}/{repo}/security-advisories/{ghsa_id}"],
|
|
18204
|
+
listGlobalAdvisories: ["GET /advisories"],
|
|
18205
|
+
listOrgRepositoryAdvisories: ["GET /orgs/{org}/security-advisories"],
|
|
18206
|
+
listRepositoryAdvisories: ["GET /repos/{owner}/{repo}/security-advisories"],
|
|
18207
|
+
updateRepositoryAdvisory: ["PATCH /repos/{owner}/{repo}/security-advisories/{ghsa_id}"]
|
|
18208
|
+
},
|
|
18209
|
+
teams: {
|
|
18210
|
+
addOrUpdateMembershipForUserInOrg: ["PUT /orgs/{org}/teams/{team_slug}/memberships/{username}"],
|
|
18211
|
+
addOrUpdateRepoPermissionsInOrg: ["PUT /orgs/{org}/teams/{team_slug}/repos/{owner}/{repo}"],
|
|
18212
|
+
checkPermissionsForRepoInOrg: ["GET /orgs/{org}/teams/{team_slug}/repos/{owner}/{repo}"],
|
|
18213
|
+
create: ["POST /orgs/{org}/teams"],
|
|
18214
|
+
createDiscussionCommentInOrg: ["POST /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments"],
|
|
18215
|
+
createDiscussionInOrg: ["POST /orgs/{org}/teams/{team_slug}/discussions"],
|
|
18216
|
+
deleteDiscussionCommentInOrg: ["DELETE /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}"],
|
|
18217
|
+
deleteDiscussionInOrg: ["DELETE /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}"],
|
|
18218
|
+
deleteInOrg: ["DELETE /orgs/{org}/teams/{team_slug}"],
|
|
18219
|
+
getByName: ["GET /orgs/{org}/teams/{team_slug}"],
|
|
18220
|
+
getDiscussionCommentInOrg: ["GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}"],
|
|
18221
|
+
getDiscussionInOrg: ["GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}"],
|
|
18222
|
+
getMembershipForUserInOrg: ["GET /orgs/{org}/teams/{team_slug}/memberships/{username}"],
|
|
18223
|
+
list: ["GET /orgs/{org}/teams"],
|
|
18224
|
+
listChildInOrg: ["GET /orgs/{org}/teams/{team_slug}/teams"],
|
|
18225
|
+
listDiscussionCommentsInOrg: ["GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments"],
|
|
18226
|
+
listDiscussionsInOrg: ["GET /orgs/{org}/teams/{team_slug}/discussions"],
|
|
18227
|
+
listForAuthenticatedUser: ["GET /user/teams"],
|
|
18228
|
+
listMembersInOrg: ["GET /orgs/{org}/teams/{team_slug}/members"],
|
|
18229
|
+
listPendingInvitationsInOrg: ["GET /orgs/{org}/teams/{team_slug}/invitations"],
|
|
18230
|
+
listReposInOrg: ["GET /orgs/{org}/teams/{team_slug}/repos"],
|
|
18231
|
+
removeMembershipForUserInOrg: ["DELETE /orgs/{org}/teams/{team_slug}/memberships/{username}"],
|
|
18232
|
+
removeRepoInOrg: ["DELETE /orgs/{org}/teams/{team_slug}/repos/{owner}/{repo}"],
|
|
18233
|
+
updateDiscussionCommentInOrg: ["PATCH /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}"],
|
|
18234
|
+
updateDiscussionInOrg: ["PATCH /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}"],
|
|
18235
|
+
updateInOrg: ["PATCH /orgs/{org}/teams/{team_slug}"]
|
|
18236
|
+
},
|
|
18237
|
+
users: {
|
|
18238
|
+
addEmailForAuthenticated: [
|
|
18239
|
+
"POST /user/emails",
|
|
18240
|
+
{},
|
|
18241
|
+
{ renamed: ["users", "addEmailForAuthenticatedUser"] }
|
|
18242
|
+
],
|
|
18243
|
+
addEmailForAuthenticatedUser: ["POST /user/emails"],
|
|
18244
|
+
addSocialAccountForAuthenticatedUser: ["POST /user/social_accounts"],
|
|
18245
|
+
block: ["PUT /user/blocks/{username}"],
|
|
18246
|
+
checkBlocked: ["GET /user/blocks/{username}"],
|
|
18247
|
+
checkFollowingForUser: ["GET /users/{username}/following/{target_user}"],
|
|
18248
|
+
checkPersonIsFollowedByAuthenticated: ["GET /user/following/{username}"],
|
|
18249
|
+
createGpgKeyForAuthenticated: [
|
|
18250
|
+
"POST /user/gpg_keys",
|
|
18251
|
+
{},
|
|
18252
|
+
{ renamed: ["users", "createGpgKeyForAuthenticatedUser"] }
|
|
18253
|
+
],
|
|
18254
|
+
createGpgKeyForAuthenticatedUser: ["POST /user/gpg_keys"],
|
|
18255
|
+
createPublicSshKeyForAuthenticated: [
|
|
18256
|
+
"POST /user/keys",
|
|
18257
|
+
{},
|
|
18258
|
+
{ renamed: ["users", "createPublicSshKeyForAuthenticatedUser"] }
|
|
18259
|
+
],
|
|
18260
|
+
createPublicSshKeyForAuthenticatedUser: ["POST /user/keys"],
|
|
18261
|
+
createSshSigningKeyForAuthenticatedUser: ["POST /user/ssh_signing_keys"],
|
|
18262
|
+
deleteAttestationsBulk: ["POST /users/{username}/attestations/delete-request"],
|
|
18263
|
+
deleteAttestationsById: ["DELETE /users/{username}/attestations/{attestation_id}"],
|
|
18264
|
+
deleteAttestationsBySubjectDigest: ["DELETE /users/{username}/attestations/digest/{subject_digest}"],
|
|
18265
|
+
deleteEmailForAuthenticated: [
|
|
18266
|
+
"DELETE /user/emails",
|
|
18267
|
+
{},
|
|
18268
|
+
{ renamed: ["users", "deleteEmailForAuthenticatedUser"] }
|
|
18269
|
+
],
|
|
18270
|
+
deleteEmailForAuthenticatedUser: ["DELETE /user/emails"],
|
|
18271
|
+
deleteGpgKeyForAuthenticated: [
|
|
18272
|
+
"DELETE /user/gpg_keys/{gpg_key_id}",
|
|
18273
|
+
{},
|
|
18274
|
+
{ renamed: ["users", "deleteGpgKeyForAuthenticatedUser"] }
|
|
18275
|
+
],
|
|
18276
|
+
deleteGpgKeyForAuthenticatedUser: ["DELETE /user/gpg_keys/{gpg_key_id}"],
|
|
18277
|
+
deletePublicSshKeyForAuthenticated: [
|
|
18278
|
+
"DELETE /user/keys/{key_id}",
|
|
18279
|
+
{},
|
|
18280
|
+
{ renamed: ["users", "deletePublicSshKeyForAuthenticatedUser"] }
|
|
18281
|
+
],
|
|
18282
|
+
deletePublicSshKeyForAuthenticatedUser: ["DELETE /user/keys/{key_id}"],
|
|
18283
|
+
deleteSocialAccountForAuthenticatedUser: ["DELETE /user/social_accounts"],
|
|
18284
|
+
deleteSshSigningKeyForAuthenticatedUser: ["DELETE /user/ssh_signing_keys/{ssh_signing_key_id}"],
|
|
18285
|
+
follow: ["PUT /user/following/{username}"],
|
|
18286
|
+
getAuthenticated: ["GET /user"],
|
|
18287
|
+
getById: ["GET /user/{account_id}"],
|
|
18288
|
+
getByUsername: ["GET /users/{username}"],
|
|
18289
|
+
getContextForUser: ["GET /users/{username}/hovercard"],
|
|
18290
|
+
getGpgKeyForAuthenticated: [
|
|
18291
|
+
"GET /user/gpg_keys/{gpg_key_id}",
|
|
18292
|
+
{},
|
|
18293
|
+
{ renamed: ["users", "getGpgKeyForAuthenticatedUser"] }
|
|
18294
|
+
],
|
|
18295
|
+
getGpgKeyForAuthenticatedUser: ["GET /user/gpg_keys/{gpg_key_id}"],
|
|
18296
|
+
getPublicSshKeyForAuthenticated: [
|
|
18297
|
+
"GET /user/keys/{key_id}",
|
|
18298
|
+
{},
|
|
18299
|
+
{ renamed: ["users", "getPublicSshKeyForAuthenticatedUser"] }
|
|
18300
|
+
],
|
|
18301
|
+
getPublicSshKeyForAuthenticatedUser: ["GET /user/keys/{key_id}"],
|
|
18302
|
+
getSshSigningKeyForAuthenticatedUser: ["GET /user/ssh_signing_keys/{ssh_signing_key_id}"],
|
|
18303
|
+
list: ["GET /users"],
|
|
18304
|
+
listAttestations: ["GET /users/{username}/attestations/{subject_digest}"],
|
|
18305
|
+
listAttestationsBulk: ["POST /users/{username}/attestations/bulk-list{?per_page,before,after}"],
|
|
18306
|
+
listBlockedByAuthenticated: [
|
|
18307
|
+
"GET /user/blocks",
|
|
18308
|
+
{},
|
|
18309
|
+
{ renamed: ["users", "listBlockedByAuthenticatedUser"] }
|
|
18310
|
+
],
|
|
18311
|
+
listBlockedByAuthenticatedUser: ["GET /user/blocks"],
|
|
18312
|
+
listEmailsForAuthenticated: [
|
|
18313
|
+
"GET /user/emails",
|
|
18314
|
+
{},
|
|
18315
|
+
{ renamed: ["users", "listEmailsForAuthenticatedUser"] }
|
|
18316
|
+
],
|
|
18317
|
+
listEmailsForAuthenticatedUser: ["GET /user/emails"],
|
|
18318
|
+
listFollowedByAuthenticated: [
|
|
18319
|
+
"GET /user/following",
|
|
18320
|
+
{},
|
|
18321
|
+
{ renamed: ["users", "listFollowedByAuthenticatedUser"] }
|
|
18322
|
+
],
|
|
18323
|
+
listFollowedByAuthenticatedUser: ["GET /user/following"],
|
|
18324
|
+
listFollowersForAuthenticatedUser: ["GET /user/followers"],
|
|
18325
|
+
listFollowersForUser: ["GET /users/{username}/followers"],
|
|
18326
|
+
listFollowingForUser: ["GET /users/{username}/following"],
|
|
18327
|
+
listGpgKeysForAuthenticated: [
|
|
18328
|
+
"GET /user/gpg_keys",
|
|
18329
|
+
{},
|
|
18330
|
+
{ renamed: ["users", "listGpgKeysForAuthenticatedUser"] }
|
|
18331
|
+
],
|
|
18332
|
+
listGpgKeysForAuthenticatedUser: ["GET /user/gpg_keys"],
|
|
18333
|
+
listGpgKeysForUser: ["GET /users/{username}/gpg_keys"],
|
|
18334
|
+
listPublicEmailsForAuthenticated: [
|
|
18335
|
+
"GET /user/public_emails",
|
|
18336
|
+
{},
|
|
18337
|
+
{ renamed: ["users", "listPublicEmailsForAuthenticatedUser"] }
|
|
18338
|
+
],
|
|
18339
|
+
listPublicEmailsForAuthenticatedUser: ["GET /user/public_emails"],
|
|
18340
|
+
listPublicKeysForUser: ["GET /users/{username}/keys"],
|
|
18341
|
+
listPublicSshKeysForAuthenticated: [
|
|
18342
|
+
"GET /user/keys",
|
|
18343
|
+
{},
|
|
18344
|
+
{ renamed: ["users", "listPublicSshKeysForAuthenticatedUser"] }
|
|
18345
|
+
],
|
|
18346
|
+
listPublicSshKeysForAuthenticatedUser: ["GET /user/keys"],
|
|
18347
|
+
listSocialAccountsForAuthenticatedUser: ["GET /user/social_accounts"],
|
|
18348
|
+
listSocialAccountsForUser: ["GET /users/{username}/social_accounts"],
|
|
18349
|
+
listSshSigningKeysForAuthenticatedUser: ["GET /user/ssh_signing_keys"],
|
|
18350
|
+
listSshSigningKeysForUser: ["GET /users/{username}/ssh_signing_keys"],
|
|
18351
|
+
setPrimaryEmailVisibilityForAuthenticated: [
|
|
18352
|
+
"PATCH /user/email/visibility",
|
|
18353
|
+
{},
|
|
18354
|
+
{ renamed: ["users", "setPrimaryEmailVisibilityForAuthenticatedUser"] }
|
|
18355
|
+
],
|
|
18356
|
+
setPrimaryEmailVisibilityForAuthenticatedUser: ["PATCH /user/email/visibility"],
|
|
18357
|
+
unblock: ["DELETE /user/blocks/{username}"],
|
|
18358
|
+
unfollow: ["DELETE /user/following/{username}"],
|
|
18359
|
+
updateAuthenticated: ["PATCH /user"]
|
|
18360
|
+
}
|
|
18361
|
+
};
|
|
18362
|
+
|
|
18363
|
+
//#endregion
|
|
18364
|
+
//#region ../../node_modules/@octokit/plugin-rest-endpoint-methods/dist-src/endpoints-to-methods.js
|
|
18365
|
+
const endpointMethodsMap = /* @__PURE__ */ new Map();
|
|
18366
|
+
for (const [scope, endpoints] of Object.entries(endpoints_default)) for (const [methodName, endpoint] of Object.entries(endpoints)) {
|
|
18367
|
+
const [route, defaults, decorations] = endpoint;
|
|
18368
|
+
const [method, url] = route.split(/ /);
|
|
18369
|
+
const endpointDefaults = Object.assign({
|
|
18370
|
+
method,
|
|
18371
|
+
url
|
|
18372
|
+
}, defaults);
|
|
18373
|
+
if (!endpointMethodsMap.has(scope)) endpointMethodsMap.set(scope, /* @__PURE__ */ new Map());
|
|
18374
|
+
endpointMethodsMap.get(scope).set(methodName, {
|
|
18375
|
+
scope,
|
|
18376
|
+
methodName,
|
|
18377
|
+
endpointDefaults,
|
|
18378
|
+
decorations
|
|
18379
|
+
});
|
|
18380
|
+
}
|
|
18381
|
+
const handler = {
|
|
18382
|
+
has({ scope }, methodName) {
|
|
18383
|
+
return endpointMethodsMap.get(scope).has(methodName);
|
|
18384
|
+
},
|
|
18385
|
+
getOwnPropertyDescriptor(target, methodName) {
|
|
18386
|
+
return {
|
|
18387
|
+
value: this.get(target, methodName),
|
|
18388
|
+
configurable: true,
|
|
18389
|
+
writable: true,
|
|
18390
|
+
enumerable: true
|
|
18391
|
+
};
|
|
18392
|
+
},
|
|
18393
|
+
defineProperty(target, methodName, descriptor) {
|
|
18394
|
+
Object.defineProperty(target.cache, methodName, descriptor);
|
|
18395
|
+
return true;
|
|
18396
|
+
},
|
|
18397
|
+
deleteProperty(target, methodName) {
|
|
18398
|
+
delete target.cache[methodName];
|
|
18399
|
+
return true;
|
|
18400
|
+
},
|
|
18401
|
+
ownKeys({ scope }) {
|
|
18402
|
+
return [...endpointMethodsMap.get(scope).keys()];
|
|
18403
|
+
},
|
|
18404
|
+
set(target, methodName, value) {
|
|
18405
|
+
return target.cache[methodName] = value;
|
|
18406
|
+
},
|
|
18407
|
+
get({ octokit, scope, cache }, methodName) {
|
|
18408
|
+
if (cache[methodName]) return cache[methodName];
|
|
18409
|
+
const method = endpointMethodsMap.get(scope).get(methodName);
|
|
18410
|
+
if (!method) return;
|
|
18411
|
+
const { endpointDefaults, decorations } = method;
|
|
18412
|
+
if (decorations) cache[methodName] = decorate(octokit, scope, methodName, endpointDefaults, decorations);
|
|
18413
|
+
else cache[methodName] = octokit.request.defaults(endpointDefaults);
|
|
18414
|
+
return cache[methodName];
|
|
18415
|
+
}
|
|
18416
|
+
};
|
|
18417
|
+
function endpointsToMethods(octokit) {
|
|
18418
|
+
const newMethods = {};
|
|
18419
|
+
for (const scope of endpointMethodsMap.keys()) newMethods[scope] = new Proxy({
|
|
18420
|
+
octokit,
|
|
18421
|
+
scope,
|
|
18422
|
+
cache: {}
|
|
18423
|
+
}, handler);
|
|
18424
|
+
return newMethods;
|
|
18425
|
+
}
|
|
18426
|
+
function decorate(octokit, scope, methodName, defaults, decorations) {
|
|
18427
|
+
const requestWithDefaults = octokit.request.defaults(defaults);
|
|
18428
|
+
function withDecorations(...args) {
|
|
18429
|
+
let options = requestWithDefaults.endpoint.merge(...args);
|
|
18430
|
+
if (decorations.mapToData) {
|
|
18431
|
+
options = Object.assign({}, options, {
|
|
18432
|
+
data: options[decorations.mapToData],
|
|
18433
|
+
[decorations.mapToData]: void 0
|
|
18434
|
+
});
|
|
18435
|
+
return requestWithDefaults(options);
|
|
18436
|
+
}
|
|
18437
|
+
if (decorations.renamed) {
|
|
18438
|
+
const [newScope, newMethodName] = decorations.renamed;
|
|
18439
|
+
octokit.log.warn(`octokit.${scope}.${methodName}() has been renamed to octokit.${newScope}.${newMethodName}()`);
|
|
18440
|
+
}
|
|
18441
|
+
if (decorations.deprecated) octokit.log.warn(decorations.deprecated);
|
|
18442
|
+
if (decorations.renamedParameters) {
|
|
18443
|
+
const options2 = requestWithDefaults.endpoint.merge(...args);
|
|
18444
|
+
for (const [name, alias] of Object.entries(decorations.renamedParameters)) if (name in options2) {
|
|
18445
|
+
octokit.log.warn(`"${name}" parameter is deprecated for "octokit.${scope}.${methodName}()". Use "${alias}" instead`);
|
|
18446
|
+
if (!(alias in options2)) options2[alias] = options2[name];
|
|
18447
|
+
delete options2[name];
|
|
18448
|
+
}
|
|
18449
|
+
return requestWithDefaults(options2);
|
|
18450
|
+
}
|
|
18451
|
+
return requestWithDefaults(...args);
|
|
18452
|
+
}
|
|
18453
|
+
return Object.assign(withDecorations, requestWithDefaults);
|
|
18454
|
+
}
|
|
18455
|
+
|
|
18456
|
+
//#endregion
|
|
18457
|
+
//#region ../../node_modules/@octokit/plugin-rest-endpoint-methods/dist-src/index.js
|
|
18458
|
+
function restEndpointMethods(octokit) {
|
|
18459
|
+
return { rest: endpointsToMethods(octokit) };
|
|
18460
|
+
}
|
|
18461
|
+
restEndpointMethods.VERSION = VERSION$3;
|
|
18462
|
+
function legacyRestEndpointMethods(octokit) {
|
|
18463
|
+
const api = endpointsToMethods(octokit);
|
|
18464
|
+
return {
|
|
18465
|
+
...api,
|
|
18466
|
+
rest: api
|
|
18467
|
+
};
|
|
18468
|
+
}
|
|
18469
|
+
legacyRestEndpointMethods.VERSION = VERSION$3;
|
|
18470
|
+
|
|
18471
|
+
//#endregion
|
|
18472
|
+
//#region ../../node_modules/@octokit/rest/dist-src/version.js
|
|
18473
|
+
const VERSION$2 = "22.0.1";
|
|
18474
|
+
|
|
18475
|
+
//#endregion
|
|
18476
|
+
//#region ../../node_modules/@octokit/rest/dist-src/index.js
|
|
18477
|
+
const Octokit = Octokit$1.plugin(requestLog, legacyRestEndpointMethods, paginateRest).defaults({ userAgent: `octokit-rest.js/${VERSION$2}` });
|
|
18478
|
+
|
|
18479
|
+
//#endregion
|
|
18480
|
+
//#region ../../node_modules/bottleneck/light.js
|
|
18481
|
+
var require_light = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
18482
|
+
/**
|
|
18483
|
+
* This file contains the Bottleneck library (MIT), compiled to ES2017, and without Clustering support.
|
|
18484
|
+
* https://github.com/SGrondin/bottleneck
|
|
18485
|
+
*/
|
|
18486
|
+
(function(global, factory) {
|
|
18487
|
+
typeof exports === "object" && typeof module !== "undefined" ? module.exports = factory() : typeof define === "function" && define.amd ? define(factory) : global.Bottleneck = factory();
|
|
18488
|
+
})(exports, (function() {
|
|
18489
|
+
"use strict";
|
|
18490
|
+
var commonjsGlobal = typeof globalThis !== "undefined" ? globalThis : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : {};
|
|
18491
|
+
function getCjsExportFromNamespace(n) {
|
|
18492
|
+
return n && n["default"] || n;
|
|
18493
|
+
}
|
|
18494
|
+
var load = function(received, defaults, onto = {}) {
|
|
18495
|
+
var k, ref, v;
|
|
18496
|
+
for (k in defaults) {
|
|
18497
|
+
v = defaults[k];
|
|
18498
|
+
onto[k] = (ref = received[k]) != null ? ref : v;
|
|
18499
|
+
}
|
|
18500
|
+
return onto;
|
|
18501
|
+
};
|
|
18502
|
+
var overwrite = function(received, defaults, onto = {}) {
|
|
18503
|
+
var k, v;
|
|
18504
|
+
for (k in received) {
|
|
18505
|
+
v = received[k];
|
|
18506
|
+
if (defaults[k] !== void 0) onto[k] = v;
|
|
18507
|
+
}
|
|
18508
|
+
return onto;
|
|
18509
|
+
};
|
|
18510
|
+
var parser = {
|
|
18511
|
+
load,
|
|
18512
|
+
overwrite
|
|
18513
|
+
};
|
|
18514
|
+
var DLList_1 = class DLList {
|
|
18515
|
+
constructor(incr, decr) {
|
|
18516
|
+
this.incr = incr;
|
|
18517
|
+
this.decr = decr;
|
|
18518
|
+
this._first = null;
|
|
18519
|
+
this._last = null;
|
|
18520
|
+
this.length = 0;
|
|
18521
|
+
}
|
|
18522
|
+
push(value) {
|
|
18523
|
+
var node;
|
|
18524
|
+
this.length++;
|
|
18525
|
+
if (typeof this.incr === "function") this.incr();
|
|
18526
|
+
node = {
|
|
18527
|
+
value,
|
|
18528
|
+
prev: this._last,
|
|
18529
|
+
next: null
|
|
18530
|
+
};
|
|
18531
|
+
if (this._last != null) {
|
|
18532
|
+
this._last.next = node;
|
|
18533
|
+
this._last = node;
|
|
18534
|
+
} else this._first = this._last = node;
|
|
18535
|
+
}
|
|
18536
|
+
shift() {
|
|
18537
|
+
var value;
|
|
18538
|
+
if (this._first == null) return;
|
|
18539
|
+
else {
|
|
18540
|
+
this.length--;
|
|
18541
|
+
if (typeof this.decr === "function") this.decr();
|
|
18542
|
+
}
|
|
18543
|
+
value = this._first.value;
|
|
18544
|
+
if ((this._first = this._first.next) != null) this._first.prev = null;
|
|
18545
|
+
else this._last = null;
|
|
18546
|
+
return value;
|
|
18547
|
+
}
|
|
18548
|
+
first() {
|
|
18549
|
+
if (this._first != null) return this._first.value;
|
|
18550
|
+
}
|
|
18551
|
+
getArray() {
|
|
18552
|
+
var node = this._first, ref, results = [];
|
|
18553
|
+
while (node != null) results.push((ref = node, node = node.next, ref.value));
|
|
18554
|
+
return results;
|
|
18555
|
+
}
|
|
18556
|
+
forEachShift(cb) {
|
|
18557
|
+
var node = this.shift();
|
|
18558
|
+
while (node != null) cb(node), node = this.shift();
|
|
18559
|
+
}
|
|
18560
|
+
debug() {
|
|
18561
|
+
var node = this._first, ref, ref1, ref2, results = [];
|
|
18562
|
+
while (node != null) results.push((ref = node, node = node.next, {
|
|
18563
|
+
value: ref.value,
|
|
18564
|
+
prev: (ref1 = ref.prev) != null ? ref1.value : void 0,
|
|
18565
|
+
next: (ref2 = ref.next) != null ? ref2.value : void 0
|
|
18566
|
+
}));
|
|
18567
|
+
return results;
|
|
18568
|
+
}
|
|
18569
|
+
};
|
|
18570
|
+
var Events_1 = class Events {
|
|
18571
|
+
constructor(instance) {
|
|
18572
|
+
this.instance = instance;
|
|
18573
|
+
this._events = {};
|
|
18574
|
+
if (this.instance.on != null || this.instance.once != null || this.instance.removeAllListeners != null) throw new Error("An Emitter already exists for this object");
|
|
18575
|
+
this.instance.on = (name, cb) => {
|
|
18576
|
+
return this._addListener(name, "many", cb);
|
|
18577
|
+
};
|
|
18578
|
+
this.instance.once = (name, cb) => {
|
|
18579
|
+
return this._addListener(name, "once", cb);
|
|
18580
|
+
};
|
|
18581
|
+
this.instance.removeAllListeners = (name = null) => {
|
|
18582
|
+
if (name != null) return delete this._events[name];
|
|
18583
|
+
else return this._events = {};
|
|
18584
|
+
};
|
|
18585
|
+
}
|
|
18586
|
+
_addListener(name, status, cb) {
|
|
18587
|
+
var base;
|
|
18588
|
+
if ((base = this._events)[name] == null) base[name] = [];
|
|
18589
|
+
this._events[name].push({
|
|
18590
|
+
cb,
|
|
18591
|
+
status
|
|
18592
|
+
});
|
|
18593
|
+
return this.instance;
|
|
18594
|
+
}
|
|
18595
|
+
listenerCount(name) {
|
|
18596
|
+
if (this._events[name] != null) return this._events[name].length;
|
|
18597
|
+
else return 0;
|
|
18598
|
+
}
|
|
18599
|
+
async trigger(name, ...args) {
|
|
18600
|
+
var e, promises;
|
|
18601
|
+
try {
|
|
18602
|
+
if (name !== "debug") this.trigger("debug", `Event triggered: ${name}`, args);
|
|
18603
|
+
if (this._events[name] == null) return;
|
|
18604
|
+
this._events[name] = this._events[name].filter(function(listener) {
|
|
18605
|
+
return listener.status !== "none";
|
|
18606
|
+
});
|
|
18607
|
+
promises = this._events[name].map(async (listener) => {
|
|
18608
|
+
var e, returned;
|
|
18609
|
+
if (listener.status === "none") return;
|
|
18610
|
+
if (listener.status === "once") listener.status = "none";
|
|
18611
|
+
try {
|
|
18612
|
+
returned = typeof listener.cb === "function" ? listener.cb(...args) : void 0;
|
|
18613
|
+
if (typeof (returned != null ? returned.then : void 0) === "function") return await returned;
|
|
18614
|
+
else return returned;
|
|
18615
|
+
} catch (error) {
|
|
18616
|
+
e = error;
|
|
18617
|
+
this.trigger("error", e);
|
|
18618
|
+
return null;
|
|
18619
|
+
}
|
|
18620
|
+
});
|
|
18621
|
+
return (await Promise.all(promises)).find(function(x) {
|
|
18622
|
+
return x != null;
|
|
18623
|
+
});
|
|
18624
|
+
} catch (error) {
|
|
18625
|
+
e = error;
|
|
18626
|
+
this.trigger("error", e);
|
|
18627
|
+
return null;
|
|
18628
|
+
}
|
|
18629
|
+
}
|
|
18630
|
+
};
|
|
18631
|
+
var DLList$1 = DLList_1, Events$1 = Events_1;
|
|
18632
|
+
var Queues_1 = class Queues {
|
|
18633
|
+
constructor(num_priorities) {
|
|
18634
|
+
this.Events = new Events$1(this);
|
|
18635
|
+
this._length = 0;
|
|
18636
|
+
this._lists = (function() {
|
|
18637
|
+
var j, ref, results = [];
|
|
18638
|
+
for (j = 1, ref = num_priorities; 1 <= ref ? j <= ref : j >= ref; 1 <= ref ? ++j : --j) results.push(new DLList$1((() => {
|
|
18639
|
+
return this.incr();
|
|
18640
|
+
}), (() => {
|
|
18641
|
+
return this.decr();
|
|
18642
|
+
})));
|
|
18643
|
+
return results;
|
|
18644
|
+
}).call(this);
|
|
18645
|
+
}
|
|
18646
|
+
incr() {
|
|
18647
|
+
if (this._length++ === 0) return this.Events.trigger("leftzero");
|
|
18648
|
+
}
|
|
18649
|
+
decr() {
|
|
18650
|
+
if (--this._length === 0) return this.Events.trigger("zero");
|
|
18651
|
+
}
|
|
18652
|
+
push(job) {
|
|
18653
|
+
return this._lists[job.options.priority].push(job);
|
|
18654
|
+
}
|
|
18655
|
+
queued(priority) {
|
|
18656
|
+
if (priority != null) return this._lists[priority].length;
|
|
18657
|
+
else return this._length;
|
|
18658
|
+
}
|
|
18659
|
+
shiftAll(fn) {
|
|
18660
|
+
return this._lists.forEach(function(list) {
|
|
18661
|
+
return list.forEachShift(fn);
|
|
18662
|
+
});
|
|
18663
|
+
}
|
|
18664
|
+
getFirst(arr = this._lists) {
|
|
18665
|
+
var j, len, list;
|
|
18666
|
+
for (j = 0, len = arr.length; j < len; j++) {
|
|
18667
|
+
list = arr[j];
|
|
18668
|
+
if (list.length > 0) return list;
|
|
18669
|
+
}
|
|
18670
|
+
return [];
|
|
18671
|
+
}
|
|
18672
|
+
shiftLastFrom(priority) {
|
|
18673
|
+
return this.getFirst(this._lists.slice(priority).reverse()).shift();
|
|
18674
|
+
}
|
|
18675
|
+
};
|
|
18676
|
+
var BottleneckError_1 = class BottleneckError extends Error {};
|
|
18677
|
+
var BottleneckError$1, DEFAULT_PRIORITY, Job, NUM_PRIORITIES = 10, parser$1;
|
|
18678
|
+
DEFAULT_PRIORITY = 5;
|
|
18679
|
+
parser$1 = parser;
|
|
18680
|
+
BottleneckError$1 = BottleneckError_1;
|
|
18681
|
+
Job = class Job {
|
|
18682
|
+
constructor(task, args, options, jobDefaults, rejectOnDrop, Events, _states, Promise) {
|
|
18683
|
+
this.task = task;
|
|
18684
|
+
this.args = args;
|
|
18685
|
+
this.rejectOnDrop = rejectOnDrop;
|
|
18686
|
+
this.Events = Events;
|
|
18687
|
+
this._states = _states;
|
|
18688
|
+
this.Promise = Promise;
|
|
18689
|
+
this.options = parser$1.load(options, jobDefaults);
|
|
18690
|
+
this.options.priority = this._sanitizePriority(this.options.priority);
|
|
18691
|
+
if (this.options.id === jobDefaults.id) this.options.id = `${this.options.id}-${this._randomIndex()}`;
|
|
18692
|
+
this.promise = new this.Promise((_resolve, _reject) => {
|
|
18693
|
+
this._resolve = _resolve;
|
|
18694
|
+
this._reject = _reject;
|
|
18695
|
+
});
|
|
18696
|
+
this.retryCount = 0;
|
|
18697
|
+
}
|
|
18698
|
+
_sanitizePriority(priority) {
|
|
18699
|
+
var sProperty = ~~priority !== priority ? DEFAULT_PRIORITY : priority;
|
|
18700
|
+
if (sProperty < 0) return 0;
|
|
18701
|
+
else if (sProperty > NUM_PRIORITIES - 1) return NUM_PRIORITIES - 1;
|
|
18702
|
+
else return sProperty;
|
|
18703
|
+
}
|
|
18704
|
+
_randomIndex() {
|
|
18705
|
+
return Math.random().toString(36).slice(2);
|
|
18706
|
+
}
|
|
18707
|
+
doDrop({ error, message = "This job has been dropped by Bottleneck" } = {}) {
|
|
18708
|
+
if (this._states.remove(this.options.id)) {
|
|
18709
|
+
if (this.rejectOnDrop) this._reject(error != null ? error : new BottleneckError$1(message));
|
|
18710
|
+
this.Events.trigger("dropped", {
|
|
18711
|
+
args: this.args,
|
|
18712
|
+
options: this.options,
|
|
18713
|
+
task: this.task,
|
|
18714
|
+
promise: this.promise
|
|
18715
|
+
});
|
|
18716
|
+
return true;
|
|
18717
|
+
} else return false;
|
|
18718
|
+
}
|
|
18719
|
+
_assertStatus(expected) {
|
|
18720
|
+
var status = this._states.jobStatus(this.options.id);
|
|
18721
|
+
if (!(status === expected || expected === "DONE" && status === null)) throw new BottleneckError$1(`Invalid job status ${status}, expected ${expected}. Please open an issue at https://github.com/SGrondin/bottleneck/issues`);
|
|
18722
|
+
}
|
|
18723
|
+
doReceive() {
|
|
18724
|
+
this._states.start(this.options.id);
|
|
18725
|
+
return this.Events.trigger("received", {
|
|
18726
|
+
args: this.args,
|
|
18727
|
+
options: this.options
|
|
18728
|
+
});
|
|
18729
|
+
}
|
|
18730
|
+
doQueue(reachedHWM, blocked) {
|
|
18731
|
+
this._assertStatus("RECEIVED");
|
|
18732
|
+
this._states.next(this.options.id);
|
|
18733
|
+
return this.Events.trigger("queued", {
|
|
18734
|
+
args: this.args,
|
|
18735
|
+
options: this.options,
|
|
18736
|
+
reachedHWM,
|
|
18737
|
+
blocked
|
|
18738
|
+
});
|
|
18739
|
+
}
|
|
18740
|
+
doRun() {
|
|
18741
|
+
if (this.retryCount === 0) {
|
|
18742
|
+
this._assertStatus("QUEUED");
|
|
18743
|
+
this._states.next(this.options.id);
|
|
18744
|
+
} else this._assertStatus("EXECUTING");
|
|
18745
|
+
return this.Events.trigger("scheduled", {
|
|
18746
|
+
args: this.args,
|
|
18747
|
+
options: this.options
|
|
18748
|
+
});
|
|
18749
|
+
}
|
|
18750
|
+
async doExecute(chained, clearGlobalState, run, free) {
|
|
18751
|
+
var error, eventInfo, passed;
|
|
18752
|
+
if (this.retryCount === 0) {
|
|
18753
|
+
this._assertStatus("RUNNING");
|
|
18754
|
+
this._states.next(this.options.id);
|
|
18755
|
+
} else this._assertStatus("EXECUTING");
|
|
18756
|
+
eventInfo = {
|
|
18757
|
+
args: this.args,
|
|
18758
|
+
options: this.options,
|
|
18759
|
+
retryCount: this.retryCount
|
|
18760
|
+
};
|
|
18761
|
+
this.Events.trigger("executing", eventInfo);
|
|
18762
|
+
try {
|
|
18763
|
+
passed = await (chained != null ? chained.schedule(this.options, this.task, ...this.args) : this.task(...this.args));
|
|
18764
|
+
if (clearGlobalState()) {
|
|
18765
|
+
this.doDone(eventInfo);
|
|
18766
|
+
await free(this.options, eventInfo);
|
|
18767
|
+
this._assertStatus("DONE");
|
|
18768
|
+
return this._resolve(passed);
|
|
18769
|
+
}
|
|
18770
|
+
} catch (error1) {
|
|
18771
|
+
error = error1;
|
|
18772
|
+
return this._onFailure(error, eventInfo, clearGlobalState, run, free);
|
|
18773
|
+
}
|
|
18774
|
+
}
|
|
18775
|
+
doExpire(clearGlobalState, run, free) {
|
|
18776
|
+
var error, eventInfo;
|
|
18777
|
+
if (this._states.jobStatus(this.options.id === "RUNNING")) this._states.next(this.options.id);
|
|
18778
|
+
this._assertStatus("EXECUTING");
|
|
18779
|
+
eventInfo = {
|
|
18780
|
+
args: this.args,
|
|
18781
|
+
options: this.options,
|
|
18782
|
+
retryCount: this.retryCount
|
|
18783
|
+
};
|
|
18784
|
+
error = new BottleneckError$1(`This job timed out after ${this.options.expiration} ms.`);
|
|
18785
|
+
return this._onFailure(error, eventInfo, clearGlobalState, run, free);
|
|
18786
|
+
}
|
|
18787
|
+
async _onFailure(error, eventInfo, clearGlobalState, run, free) {
|
|
18788
|
+
var retry, retryAfter;
|
|
18789
|
+
if (clearGlobalState()) {
|
|
18790
|
+
retry = await this.Events.trigger("failed", error, eventInfo);
|
|
18791
|
+
if (retry != null) {
|
|
18792
|
+
retryAfter = ~~retry;
|
|
18793
|
+
this.Events.trigger("retry", `Retrying ${this.options.id} after ${retryAfter} ms`, eventInfo);
|
|
18794
|
+
this.retryCount++;
|
|
18795
|
+
return run(retryAfter);
|
|
18796
|
+
} else {
|
|
18797
|
+
this.doDone(eventInfo);
|
|
18798
|
+
await free(this.options, eventInfo);
|
|
18799
|
+
this._assertStatus("DONE");
|
|
18800
|
+
return this._reject(error);
|
|
18801
|
+
}
|
|
18802
|
+
}
|
|
18803
|
+
}
|
|
18804
|
+
doDone(eventInfo) {
|
|
18805
|
+
this._assertStatus("EXECUTING");
|
|
18806
|
+
this._states.next(this.options.id);
|
|
18807
|
+
return this.Events.trigger("done", eventInfo);
|
|
18808
|
+
}
|
|
18809
|
+
};
|
|
18810
|
+
var Job_1 = Job;
|
|
18811
|
+
var BottleneckError$2, LocalDatastore, parser$2 = parser;
|
|
18812
|
+
BottleneckError$2 = BottleneckError_1;
|
|
18813
|
+
LocalDatastore = class LocalDatastore {
|
|
18814
|
+
constructor(instance, storeOptions, storeInstanceOptions) {
|
|
18815
|
+
this.instance = instance;
|
|
18816
|
+
this.storeOptions = storeOptions;
|
|
18817
|
+
this.clientId = this.instance._randomIndex();
|
|
18818
|
+
parser$2.load(storeInstanceOptions, storeInstanceOptions, this);
|
|
18819
|
+
this._nextRequest = this._lastReservoirRefresh = this._lastReservoirIncrease = Date.now();
|
|
18820
|
+
this._running = 0;
|
|
18821
|
+
this._done = 0;
|
|
18822
|
+
this._unblockTime = 0;
|
|
18823
|
+
this.ready = this.Promise.resolve();
|
|
18824
|
+
this.clients = {};
|
|
18825
|
+
this._startHeartbeat();
|
|
18826
|
+
}
|
|
18827
|
+
_startHeartbeat() {
|
|
18828
|
+
var base;
|
|
18829
|
+
if (this.heartbeat == null && (this.storeOptions.reservoirRefreshInterval != null && this.storeOptions.reservoirRefreshAmount != null || this.storeOptions.reservoirIncreaseInterval != null && this.storeOptions.reservoirIncreaseAmount != null)) return typeof (base = this.heartbeat = setInterval(() => {
|
|
18830
|
+
var amount, incr, maximum, now = Date.now(), reservoir;
|
|
18831
|
+
if (this.storeOptions.reservoirRefreshInterval != null && now >= this._lastReservoirRefresh + this.storeOptions.reservoirRefreshInterval) {
|
|
18832
|
+
this._lastReservoirRefresh = now;
|
|
18833
|
+
this.storeOptions.reservoir = this.storeOptions.reservoirRefreshAmount;
|
|
18834
|
+
this.instance._drainAll(this.computeCapacity());
|
|
18835
|
+
}
|
|
18836
|
+
if (this.storeOptions.reservoirIncreaseInterval != null && now >= this._lastReservoirIncrease + this.storeOptions.reservoirIncreaseInterval) {
|
|
18837
|
+
({reservoirIncreaseAmount: amount, reservoirIncreaseMaximum: maximum, reservoir} = this.storeOptions);
|
|
18838
|
+
this._lastReservoirIncrease = now;
|
|
18839
|
+
incr = maximum != null ? Math.min(amount, maximum - reservoir) : amount;
|
|
18840
|
+
if (incr > 0) {
|
|
18841
|
+
this.storeOptions.reservoir += incr;
|
|
18842
|
+
return this.instance._drainAll(this.computeCapacity());
|
|
18843
|
+
}
|
|
18844
|
+
}
|
|
18845
|
+
}, this.heartbeatInterval)).unref === "function" ? base.unref() : void 0;
|
|
18846
|
+
else return clearInterval(this.heartbeat);
|
|
18847
|
+
}
|
|
18848
|
+
async __publish__(message) {
|
|
18849
|
+
await this.yieldLoop();
|
|
18850
|
+
return this.instance.Events.trigger("message", message.toString());
|
|
18851
|
+
}
|
|
18852
|
+
async __disconnect__(flush) {
|
|
18853
|
+
await this.yieldLoop();
|
|
18854
|
+
clearInterval(this.heartbeat);
|
|
18855
|
+
return this.Promise.resolve();
|
|
18856
|
+
}
|
|
18857
|
+
yieldLoop(t = 0) {
|
|
18858
|
+
return new this.Promise(function(resolve, reject) {
|
|
18859
|
+
return setTimeout(resolve, t);
|
|
18860
|
+
});
|
|
18861
|
+
}
|
|
18862
|
+
computePenalty() {
|
|
18863
|
+
var ref;
|
|
18864
|
+
return (ref = this.storeOptions.penalty) != null ? ref : 15 * this.storeOptions.minTime || 5e3;
|
|
18865
|
+
}
|
|
18866
|
+
async __updateSettings__(options) {
|
|
18867
|
+
await this.yieldLoop();
|
|
18868
|
+
parser$2.overwrite(options, options, this.storeOptions);
|
|
18869
|
+
this._startHeartbeat();
|
|
18870
|
+
this.instance._drainAll(this.computeCapacity());
|
|
18871
|
+
return true;
|
|
18872
|
+
}
|
|
18873
|
+
async __running__() {
|
|
18874
|
+
await this.yieldLoop();
|
|
18875
|
+
return this._running;
|
|
18876
|
+
}
|
|
18877
|
+
async __queued__() {
|
|
18878
|
+
await this.yieldLoop();
|
|
18879
|
+
return this.instance.queued();
|
|
18880
|
+
}
|
|
18881
|
+
async __done__() {
|
|
18882
|
+
await this.yieldLoop();
|
|
18883
|
+
return this._done;
|
|
18884
|
+
}
|
|
18885
|
+
async __groupCheck__(time) {
|
|
18886
|
+
await this.yieldLoop();
|
|
18887
|
+
return this._nextRequest + this.timeout < time;
|
|
18888
|
+
}
|
|
18889
|
+
computeCapacity() {
|
|
18890
|
+
var maxConcurrent, reservoir;
|
|
18891
|
+
({maxConcurrent, reservoir} = this.storeOptions);
|
|
18892
|
+
if (maxConcurrent != null && reservoir != null) return Math.min(maxConcurrent - this._running, reservoir);
|
|
18893
|
+
else if (maxConcurrent != null) return maxConcurrent - this._running;
|
|
18894
|
+
else if (reservoir != null) return reservoir;
|
|
18895
|
+
else return null;
|
|
18896
|
+
}
|
|
18897
|
+
conditionsCheck(weight) {
|
|
18898
|
+
var capacity = this.computeCapacity();
|
|
18899
|
+
return capacity == null || weight <= capacity;
|
|
18900
|
+
}
|
|
18901
|
+
async __incrementReservoir__(incr) {
|
|
18902
|
+
var reservoir;
|
|
18903
|
+
await this.yieldLoop();
|
|
18904
|
+
reservoir = this.storeOptions.reservoir += incr;
|
|
18905
|
+
this.instance._drainAll(this.computeCapacity());
|
|
18906
|
+
return reservoir;
|
|
18907
|
+
}
|
|
18908
|
+
async __currentReservoir__() {
|
|
18909
|
+
await this.yieldLoop();
|
|
18910
|
+
return this.storeOptions.reservoir;
|
|
18911
|
+
}
|
|
18912
|
+
isBlocked(now) {
|
|
18913
|
+
return this._unblockTime >= now;
|
|
18914
|
+
}
|
|
18915
|
+
check(weight, now) {
|
|
18916
|
+
return this.conditionsCheck(weight) && this._nextRequest - now <= 0;
|
|
18917
|
+
}
|
|
18918
|
+
async __check__(weight) {
|
|
18919
|
+
var now;
|
|
18920
|
+
await this.yieldLoop();
|
|
18921
|
+
now = Date.now();
|
|
18922
|
+
return this.check(weight, now);
|
|
18923
|
+
}
|
|
18924
|
+
async __register__(index, weight, expiration) {
|
|
18925
|
+
var now, wait;
|
|
18926
|
+
await this.yieldLoop();
|
|
18927
|
+
now = Date.now();
|
|
18928
|
+
if (this.conditionsCheck(weight)) {
|
|
18929
|
+
this._running += weight;
|
|
18930
|
+
if (this.storeOptions.reservoir != null) this.storeOptions.reservoir -= weight;
|
|
18931
|
+
wait = Math.max(this._nextRequest - now, 0);
|
|
18932
|
+
this._nextRequest = now + wait + this.storeOptions.minTime;
|
|
18933
|
+
return {
|
|
18934
|
+
success: true,
|
|
18935
|
+
wait,
|
|
18936
|
+
reservoir: this.storeOptions.reservoir
|
|
18937
|
+
};
|
|
18938
|
+
} else return { success: false };
|
|
18939
|
+
}
|
|
18940
|
+
strategyIsBlock() {
|
|
18941
|
+
return this.storeOptions.strategy === 3;
|
|
18942
|
+
}
|
|
18943
|
+
async __submit__(queueLength, weight) {
|
|
18944
|
+
var blocked, now, reachedHWM;
|
|
18945
|
+
await this.yieldLoop();
|
|
18946
|
+
if (this.storeOptions.maxConcurrent != null && weight > this.storeOptions.maxConcurrent) throw new BottleneckError$2(`Impossible to add a job having a weight of ${weight} to a limiter having a maxConcurrent setting of ${this.storeOptions.maxConcurrent}`);
|
|
18947
|
+
now = Date.now();
|
|
18948
|
+
reachedHWM = this.storeOptions.highWater != null && queueLength === this.storeOptions.highWater && !this.check(weight, now);
|
|
18949
|
+
blocked = this.strategyIsBlock() && (reachedHWM || this.isBlocked(now));
|
|
18950
|
+
if (blocked) {
|
|
18951
|
+
this._unblockTime = now + this.computePenalty();
|
|
18952
|
+
this._nextRequest = this._unblockTime + this.storeOptions.minTime;
|
|
18953
|
+
this.instance._dropAllQueued();
|
|
18954
|
+
}
|
|
18955
|
+
return {
|
|
18956
|
+
reachedHWM,
|
|
18957
|
+
blocked,
|
|
18958
|
+
strategy: this.storeOptions.strategy
|
|
18959
|
+
};
|
|
18960
|
+
}
|
|
18961
|
+
async __free__(index, weight) {
|
|
18962
|
+
await this.yieldLoop();
|
|
18963
|
+
this._running -= weight;
|
|
18964
|
+
this._done += weight;
|
|
18965
|
+
this.instance._drainAll(this.computeCapacity());
|
|
18966
|
+
return { running: this._running };
|
|
18967
|
+
}
|
|
18968
|
+
};
|
|
18969
|
+
var LocalDatastore_1 = LocalDatastore;
|
|
18970
|
+
var BottleneckError$3 = BottleneckError_1;
|
|
18971
|
+
var States_1 = class States {
|
|
18972
|
+
constructor(status1) {
|
|
18973
|
+
this.status = status1;
|
|
18974
|
+
this._jobs = {};
|
|
18975
|
+
this.counts = this.status.map(function() {
|
|
18976
|
+
return 0;
|
|
18977
|
+
});
|
|
18978
|
+
}
|
|
18979
|
+
next(id) {
|
|
18980
|
+
var current = this._jobs[id], next = current + 1;
|
|
18981
|
+
if (current != null && next < this.status.length) {
|
|
18982
|
+
this.counts[current]--;
|
|
18983
|
+
this.counts[next]++;
|
|
18984
|
+
return this._jobs[id]++;
|
|
18985
|
+
} else if (current != null) {
|
|
18986
|
+
this.counts[current]--;
|
|
18987
|
+
return delete this._jobs[id];
|
|
18988
|
+
}
|
|
18989
|
+
}
|
|
18990
|
+
start(id) {
|
|
18991
|
+
var initial = 0;
|
|
18992
|
+
this._jobs[id] = initial;
|
|
18993
|
+
return this.counts[initial]++;
|
|
18994
|
+
}
|
|
18995
|
+
remove(id) {
|
|
18996
|
+
var current = this._jobs[id];
|
|
18997
|
+
if (current != null) {
|
|
18998
|
+
this.counts[current]--;
|
|
18999
|
+
delete this._jobs[id];
|
|
19000
|
+
}
|
|
19001
|
+
return current != null;
|
|
19002
|
+
}
|
|
19003
|
+
jobStatus(id) {
|
|
19004
|
+
var ref;
|
|
19005
|
+
return (ref = this.status[this._jobs[id]]) != null ? ref : null;
|
|
19006
|
+
}
|
|
19007
|
+
statusJobs(status) {
|
|
19008
|
+
var k, pos, ref, results, v;
|
|
19009
|
+
if (status != null) {
|
|
19010
|
+
pos = this.status.indexOf(status);
|
|
19011
|
+
if (pos < 0) throw new BottleneckError$3(`status must be one of ${this.status.join(", ")}`);
|
|
19012
|
+
ref = this._jobs;
|
|
19013
|
+
results = [];
|
|
19014
|
+
for (k in ref) {
|
|
19015
|
+
v = ref[k];
|
|
19016
|
+
if (v === pos) results.push(k);
|
|
19017
|
+
}
|
|
19018
|
+
return results;
|
|
19019
|
+
} else return Object.keys(this._jobs);
|
|
19020
|
+
}
|
|
19021
|
+
statusCounts() {
|
|
19022
|
+
return this.counts.reduce(((acc, v, i) => {
|
|
19023
|
+
acc[this.status[i]] = v;
|
|
19024
|
+
return acc;
|
|
19025
|
+
}), {});
|
|
19026
|
+
}
|
|
19027
|
+
};
|
|
19028
|
+
var DLList$2 = DLList_1;
|
|
19029
|
+
var Sync_1 = class Sync {
|
|
19030
|
+
constructor(name, Promise) {
|
|
19031
|
+
this.schedule = this.schedule.bind(this);
|
|
19032
|
+
this.name = name;
|
|
19033
|
+
this.Promise = Promise;
|
|
19034
|
+
this._running = 0;
|
|
19035
|
+
this._queue = new DLList$2();
|
|
19036
|
+
}
|
|
19037
|
+
isEmpty() {
|
|
19038
|
+
return this._queue.length === 0;
|
|
19039
|
+
}
|
|
19040
|
+
async _tryToRun() {
|
|
19041
|
+
var args, cb, error, reject, resolve, returned, task;
|
|
19042
|
+
if (this._running < 1 && this._queue.length > 0) {
|
|
19043
|
+
this._running++;
|
|
19044
|
+
({task, args, resolve, reject} = this._queue.shift());
|
|
19045
|
+
cb = await (async function() {
|
|
19046
|
+
try {
|
|
19047
|
+
returned = await task(...args);
|
|
19048
|
+
return function() {
|
|
19049
|
+
return resolve(returned);
|
|
19050
|
+
};
|
|
19051
|
+
} catch (error1) {
|
|
19052
|
+
error = error1;
|
|
19053
|
+
return function() {
|
|
19054
|
+
return reject(error);
|
|
19055
|
+
};
|
|
19056
|
+
}
|
|
19057
|
+
})();
|
|
19058
|
+
this._running--;
|
|
19059
|
+
this._tryToRun();
|
|
19060
|
+
return cb();
|
|
19061
|
+
}
|
|
19062
|
+
}
|
|
19063
|
+
schedule(task, ...args) {
|
|
19064
|
+
var promise, reject, resolve = reject = null;
|
|
19065
|
+
promise = new this.Promise(function(_resolve, _reject) {
|
|
19066
|
+
resolve = _resolve;
|
|
19067
|
+
return reject = _reject;
|
|
19068
|
+
});
|
|
19069
|
+
this._queue.push({
|
|
19070
|
+
task,
|
|
19071
|
+
args,
|
|
19072
|
+
resolve,
|
|
19073
|
+
reject
|
|
19074
|
+
});
|
|
19075
|
+
this._tryToRun();
|
|
19076
|
+
return promise;
|
|
19077
|
+
}
|
|
19078
|
+
};
|
|
19079
|
+
var version = "2.19.5";
|
|
19080
|
+
var version$1 = { version };
|
|
19081
|
+
var version$2 = /* @__PURE__ */ Object.freeze({
|
|
19082
|
+
version,
|
|
19083
|
+
default: version$1
|
|
19084
|
+
});
|
|
19085
|
+
var require$$2 = () => console.log("You must import the full version of Bottleneck in order to use this feature.");
|
|
19086
|
+
var require$$3 = () => console.log("You must import the full version of Bottleneck in order to use this feature.");
|
|
19087
|
+
var require$$4 = () => console.log("You must import the full version of Bottleneck in order to use this feature.");
|
|
19088
|
+
var Events$2, Group, IORedisConnection$1, RedisConnection$1, Scripts$1, parser$3 = parser;
|
|
19089
|
+
Events$2 = Events_1;
|
|
19090
|
+
RedisConnection$1 = require$$2;
|
|
19091
|
+
IORedisConnection$1 = require$$3;
|
|
19092
|
+
Scripts$1 = require$$4;
|
|
19093
|
+
Group = (function() {
|
|
19094
|
+
class Group {
|
|
19095
|
+
constructor(limiterOptions = {}) {
|
|
19096
|
+
this.deleteKey = this.deleteKey.bind(this);
|
|
19097
|
+
this.limiterOptions = limiterOptions;
|
|
19098
|
+
parser$3.load(this.limiterOptions, this.defaults, this);
|
|
19099
|
+
this.Events = new Events$2(this);
|
|
19100
|
+
this.instances = {};
|
|
19101
|
+
this.Bottleneck = Bottleneck_1;
|
|
19102
|
+
this._startAutoCleanup();
|
|
19103
|
+
this.sharedConnection = this.connection != null;
|
|
19104
|
+
if (this.connection == null) {
|
|
19105
|
+
if (this.limiterOptions.datastore === "redis") this.connection = new RedisConnection$1(Object.assign({}, this.limiterOptions, { Events: this.Events }));
|
|
19106
|
+
else if (this.limiterOptions.datastore === "ioredis") this.connection = new IORedisConnection$1(Object.assign({}, this.limiterOptions, { Events: this.Events }));
|
|
19107
|
+
}
|
|
19108
|
+
}
|
|
19109
|
+
key(key = "") {
|
|
19110
|
+
var ref;
|
|
19111
|
+
return (ref = this.instances[key]) != null ? ref : (() => {
|
|
19112
|
+
var limiter = this.instances[key] = new this.Bottleneck(Object.assign(this.limiterOptions, {
|
|
19113
|
+
id: `${this.id}-${key}`,
|
|
19114
|
+
timeout: this.timeout,
|
|
19115
|
+
connection: this.connection
|
|
19116
|
+
}));
|
|
19117
|
+
this.Events.trigger("created", limiter, key);
|
|
19118
|
+
return limiter;
|
|
19119
|
+
})();
|
|
19120
|
+
}
|
|
19121
|
+
async deleteKey(key = "") {
|
|
19122
|
+
var deleted, instance = this.instances[key];
|
|
19123
|
+
if (this.connection) deleted = await this.connection.__runCommand__(["del", ...Scripts$1.allKeys(`${this.id}-${key}`)]);
|
|
19124
|
+
if (instance != null) {
|
|
19125
|
+
delete this.instances[key];
|
|
19126
|
+
await instance.disconnect();
|
|
19127
|
+
}
|
|
19128
|
+
return instance != null || deleted > 0;
|
|
19129
|
+
}
|
|
19130
|
+
limiters() {
|
|
19131
|
+
var k, ref = this.instances, results = [], v;
|
|
19132
|
+
for (k in ref) {
|
|
19133
|
+
v = ref[k];
|
|
19134
|
+
results.push({
|
|
19135
|
+
key: k,
|
|
19136
|
+
limiter: v
|
|
19137
|
+
});
|
|
19138
|
+
}
|
|
19139
|
+
return results;
|
|
19140
|
+
}
|
|
19141
|
+
keys() {
|
|
19142
|
+
return Object.keys(this.instances);
|
|
19143
|
+
}
|
|
19144
|
+
async clusterKeys() {
|
|
19145
|
+
var cursor, end, found, i, k, keys, len, next, start;
|
|
19146
|
+
if (this.connection == null) return this.Promise.resolve(this.keys());
|
|
19147
|
+
keys = [];
|
|
19148
|
+
cursor = null;
|
|
19149
|
+
start = `b_${this.id}-`.length;
|
|
19150
|
+
end = 9;
|
|
19151
|
+
while (cursor !== 0) {
|
|
19152
|
+
[next, found] = await this.connection.__runCommand__([
|
|
19153
|
+
"scan",
|
|
19154
|
+
cursor != null ? cursor : 0,
|
|
19155
|
+
"match",
|
|
19156
|
+
`b_${this.id}-*_settings`,
|
|
19157
|
+
"count",
|
|
19158
|
+
1e4
|
|
19159
|
+
]);
|
|
19160
|
+
cursor = ~~next;
|
|
19161
|
+
for (i = 0, len = found.length; i < len; i++) {
|
|
19162
|
+
k = found[i];
|
|
19163
|
+
keys.push(k.slice(start, -end));
|
|
19164
|
+
}
|
|
19165
|
+
}
|
|
19166
|
+
return keys;
|
|
19167
|
+
}
|
|
19168
|
+
_startAutoCleanup() {
|
|
19169
|
+
var base;
|
|
19170
|
+
clearInterval(this.interval);
|
|
19171
|
+
return typeof (base = this.interval = setInterval(async () => {
|
|
19172
|
+
var e, k, ref, results, time = Date.now(), v;
|
|
19173
|
+
ref = this.instances;
|
|
19174
|
+
results = [];
|
|
19175
|
+
for (k in ref) {
|
|
19176
|
+
v = ref[k];
|
|
19177
|
+
try {
|
|
19178
|
+
if (await v._store.__groupCheck__(time)) results.push(this.deleteKey(k));
|
|
19179
|
+
else results.push(void 0);
|
|
19180
|
+
} catch (error) {
|
|
19181
|
+
e = error;
|
|
19182
|
+
results.push(v.Events.trigger("error", e));
|
|
19183
|
+
}
|
|
19184
|
+
}
|
|
19185
|
+
return results;
|
|
19186
|
+
}, this.timeout / 2)).unref === "function" ? base.unref() : void 0;
|
|
19187
|
+
}
|
|
19188
|
+
updateSettings(options = {}) {
|
|
19189
|
+
parser$3.overwrite(options, this.defaults, this);
|
|
19190
|
+
parser$3.overwrite(options, options, this.limiterOptions);
|
|
19191
|
+
if (options.timeout != null) return this._startAutoCleanup();
|
|
19192
|
+
}
|
|
19193
|
+
disconnect(flush = true) {
|
|
19194
|
+
var ref;
|
|
19195
|
+
if (!this.sharedConnection) return (ref = this.connection) != null ? ref.disconnect(flush) : void 0;
|
|
19196
|
+
}
|
|
19197
|
+
}
|
|
19198
|
+
Group.prototype.defaults = {
|
|
19199
|
+
timeout: 1e3 * 60 * 5,
|
|
19200
|
+
connection: null,
|
|
19201
|
+
Promise,
|
|
19202
|
+
id: "group-key"
|
|
19203
|
+
};
|
|
19204
|
+
return Group;
|
|
19205
|
+
}).call(commonjsGlobal);
|
|
19206
|
+
var Group_1 = Group;
|
|
19207
|
+
var Batcher, Events$3, parser$4 = parser;
|
|
19208
|
+
Events$3 = Events_1;
|
|
19209
|
+
Batcher = (function() {
|
|
19210
|
+
class Batcher {
|
|
19211
|
+
constructor(options = {}) {
|
|
19212
|
+
this.options = options;
|
|
19213
|
+
parser$4.load(this.options, this.defaults, this);
|
|
19214
|
+
this.Events = new Events$3(this);
|
|
19215
|
+
this._arr = [];
|
|
19216
|
+
this._resetPromise();
|
|
19217
|
+
this._lastFlush = Date.now();
|
|
19218
|
+
}
|
|
19219
|
+
_resetPromise() {
|
|
19220
|
+
return this._promise = new this.Promise((res, rej) => {
|
|
19221
|
+
return this._resolve = res;
|
|
19222
|
+
});
|
|
19223
|
+
}
|
|
19224
|
+
_flush() {
|
|
19225
|
+
clearTimeout(this._timeout);
|
|
19226
|
+
this._lastFlush = Date.now();
|
|
19227
|
+
this._resolve();
|
|
19228
|
+
this.Events.trigger("batch", this._arr);
|
|
19229
|
+
this._arr = [];
|
|
19230
|
+
return this._resetPromise();
|
|
19231
|
+
}
|
|
19232
|
+
add(data) {
|
|
19233
|
+
var ret;
|
|
19234
|
+
this._arr.push(data);
|
|
19235
|
+
ret = this._promise;
|
|
19236
|
+
if (this._arr.length === this.maxSize) this._flush();
|
|
19237
|
+
else if (this.maxTime != null && this._arr.length === 1) this._timeout = setTimeout(() => {
|
|
19238
|
+
return this._flush();
|
|
19239
|
+
}, this.maxTime);
|
|
19240
|
+
return ret;
|
|
19241
|
+
}
|
|
19242
|
+
}
|
|
19243
|
+
Batcher.prototype.defaults = {
|
|
19244
|
+
maxTime: null,
|
|
19245
|
+
maxSize: null,
|
|
19246
|
+
Promise
|
|
19247
|
+
};
|
|
19248
|
+
return Batcher;
|
|
19249
|
+
}).call(commonjsGlobal);
|
|
19250
|
+
var Batcher_1 = Batcher;
|
|
19251
|
+
var require$$4$1 = () => console.log("You must import the full version of Bottleneck in order to use this feature.");
|
|
19252
|
+
var require$$8 = getCjsExportFromNamespace(version$2);
|
|
19253
|
+
var Bottleneck, DEFAULT_PRIORITY$1, Events$4, Job$1, LocalDatastore$1, NUM_PRIORITIES$1, Queues$1, RedisDatastore$1, States$1, Sync$1, parser$5, splice = [].splice;
|
|
19254
|
+
NUM_PRIORITIES$1 = 10;
|
|
19255
|
+
DEFAULT_PRIORITY$1 = 5;
|
|
19256
|
+
parser$5 = parser;
|
|
19257
|
+
Queues$1 = Queues_1;
|
|
19258
|
+
Job$1 = Job_1;
|
|
19259
|
+
LocalDatastore$1 = LocalDatastore_1;
|
|
19260
|
+
RedisDatastore$1 = require$$4$1;
|
|
19261
|
+
Events$4 = Events_1;
|
|
19262
|
+
States$1 = States_1;
|
|
19263
|
+
Sync$1 = Sync_1;
|
|
19264
|
+
Bottleneck = (function() {
|
|
19265
|
+
class Bottleneck {
|
|
19266
|
+
constructor(options = {}, ...invalid) {
|
|
19267
|
+
var storeInstanceOptions, storeOptions;
|
|
19268
|
+
this._addToQueue = this._addToQueue.bind(this);
|
|
19269
|
+
this._validateOptions(options, invalid);
|
|
19270
|
+
parser$5.load(options, this.instanceDefaults, this);
|
|
19271
|
+
this._queues = new Queues$1(NUM_PRIORITIES$1);
|
|
19272
|
+
this._scheduled = {};
|
|
19273
|
+
this._states = new States$1([
|
|
19274
|
+
"RECEIVED",
|
|
19275
|
+
"QUEUED",
|
|
19276
|
+
"RUNNING",
|
|
19277
|
+
"EXECUTING"
|
|
19278
|
+
].concat(this.trackDoneStatus ? ["DONE"] : []));
|
|
19279
|
+
this._limiter = null;
|
|
19280
|
+
this.Events = new Events$4(this);
|
|
19281
|
+
this._submitLock = new Sync$1("submit", this.Promise);
|
|
19282
|
+
this._registerLock = new Sync$1("register", this.Promise);
|
|
19283
|
+
storeOptions = parser$5.load(options, this.storeDefaults, {});
|
|
19284
|
+
this._store = (function() {
|
|
19285
|
+
if (this.datastore === "redis" || this.datastore === "ioredis" || this.connection != null) {
|
|
19286
|
+
storeInstanceOptions = parser$5.load(options, this.redisStoreDefaults, {});
|
|
19287
|
+
return new RedisDatastore$1(this, storeOptions, storeInstanceOptions);
|
|
19288
|
+
} else if (this.datastore === "local") {
|
|
19289
|
+
storeInstanceOptions = parser$5.load(options, this.localStoreDefaults, {});
|
|
19290
|
+
return new LocalDatastore$1(this, storeOptions, storeInstanceOptions);
|
|
19291
|
+
} else throw new Bottleneck.prototype.BottleneckError(`Invalid datastore type: ${this.datastore}`);
|
|
19292
|
+
}).call(this);
|
|
19293
|
+
this._queues.on("leftzero", () => {
|
|
19294
|
+
var ref;
|
|
19295
|
+
return (ref = this._store.heartbeat) != null ? typeof ref.ref === "function" ? ref.ref() : void 0 : void 0;
|
|
19296
|
+
});
|
|
19297
|
+
this._queues.on("zero", () => {
|
|
19298
|
+
var ref;
|
|
19299
|
+
return (ref = this._store.heartbeat) != null ? typeof ref.unref === "function" ? ref.unref() : void 0 : void 0;
|
|
19300
|
+
});
|
|
19301
|
+
}
|
|
19302
|
+
_validateOptions(options, invalid) {
|
|
19303
|
+
if (!(options != null && typeof options === "object" && invalid.length === 0)) throw new Bottleneck.prototype.BottleneckError("Bottleneck v2 takes a single object argument. Refer to https://github.com/SGrondin/bottleneck#upgrading-to-v2 if you're upgrading from Bottleneck v1.");
|
|
19304
|
+
}
|
|
19305
|
+
ready() {
|
|
19306
|
+
return this._store.ready;
|
|
19307
|
+
}
|
|
19308
|
+
clients() {
|
|
19309
|
+
return this._store.clients;
|
|
19310
|
+
}
|
|
19311
|
+
channel() {
|
|
19312
|
+
return `b_${this.id}`;
|
|
19313
|
+
}
|
|
19314
|
+
channel_client() {
|
|
19315
|
+
return `b_${this.id}_${this._store.clientId}`;
|
|
19316
|
+
}
|
|
19317
|
+
publish(message) {
|
|
19318
|
+
return this._store.__publish__(message);
|
|
19319
|
+
}
|
|
19320
|
+
disconnect(flush = true) {
|
|
19321
|
+
return this._store.__disconnect__(flush);
|
|
19322
|
+
}
|
|
19323
|
+
chain(_limiter) {
|
|
19324
|
+
this._limiter = _limiter;
|
|
19325
|
+
return this;
|
|
19326
|
+
}
|
|
19327
|
+
queued(priority) {
|
|
19328
|
+
return this._queues.queued(priority);
|
|
19329
|
+
}
|
|
19330
|
+
clusterQueued() {
|
|
19331
|
+
return this._store.__queued__();
|
|
19332
|
+
}
|
|
19333
|
+
empty() {
|
|
19334
|
+
return this.queued() === 0 && this._submitLock.isEmpty();
|
|
19335
|
+
}
|
|
19336
|
+
running() {
|
|
19337
|
+
return this._store.__running__();
|
|
19338
|
+
}
|
|
19339
|
+
done() {
|
|
19340
|
+
return this._store.__done__();
|
|
19341
|
+
}
|
|
19342
|
+
jobStatus(id) {
|
|
19343
|
+
return this._states.jobStatus(id);
|
|
19344
|
+
}
|
|
19345
|
+
jobs(status) {
|
|
19346
|
+
return this._states.statusJobs(status);
|
|
19347
|
+
}
|
|
19348
|
+
counts() {
|
|
19349
|
+
return this._states.statusCounts();
|
|
19350
|
+
}
|
|
19351
|
+
_randomIndex() {
|
|
19352
|
+
return Math.random().toString(36).slice(2);
|
|
19353
|
+
}
|
|
19354
|
+
check(weight = 1) {
|
|
19355
|
+
return this._store.__check__(weight);
|
|
19356
|
+
}
|
|
19357
|
+
_clearGlobalState(index) {
|
|
19358
|
+
if (this._scheduled[index] != null) {
|
|
19359
|
+
clearTimeout(this._scheduled[index].expiration);
|
|
19360
|
+
delete this._scheduled[index];
|
|
19361
|
+
return true;
|
|
19362
|
+
} else return false;
|
|
19363
|
+
}
|
|
19364
|
+
async _free(index, job, options, eventInfo) {
|
|
19365
|
+
var e, running;
|
|
19366
|
+
try {
|
|
19367
|
+
({running} = await this._store.__free__(index, options.weight));
|
|
19368
|
+
this.Events.trigger("debug", `Freed ${options.id}`, eventInfo);
|
|
19369
|
+
if (running === 0 && this.empty()) return this.Events.trigger("idle");
|
|
19370
|
+
} catch (error1) {
|
|
19371
|
+
e = error1;
|
|
19372
|
+
return this.Events.trigger("error", e);
|
|
19373
|
+
}
|
|
19374
|
+
}
|
|
19375
|
+
_run(index, job, wait) {
|
|
19376
|
+
var clearGlobalState, free, run;
|
|
19377
|
+
job.doRun();
|
|
19378
|
+
clearGlobalState = this._clearGlobalState.bind(this, index);
|
|
19379
|
+
run = this._run.bind(this, index, job);
|
|
19380
|
+
free = this._free.bind(this, index, job);
|
|
19381
|
+
return this._scheduled[index] = {
|
|
19382
|
+
timeout: setTimeout(() => {
|
|
19383
|
+
return job.doExecute(this._limiter, clearGlobalState, run, free);
|
|
19384
|
+
}, wait),
|
|
19385
|
+
expiration: job.options.expiration != null ? setTimeout(function() {
|
|
19386
|
+
return job.doExpire(clearGlobalState, run, free);
|
|
19387
|
+
}, wait + job.options.expiration) : void 0,
|
|
19388
|
+
job
|
|
19389
|
+
};
|
|
19390
|
+
}
|
|
19391
|
+
_drainOne(capacity) {
|
|
19392
|
+
return this._registerLock.schedule(() => {
|
|
19393
|
+
var args, index, next, options, queue;
|
|
19394
|
+
if (this.queued() === 0) return this.Promise.resolve(null);
|
|
19395
|
+
queue = this._queues.getFirst();
|
|
19396
|
+
({options, args} = next = queue.first());
|
|
19397
|
+
if (capacity != null && options.weight > capacity) return this.Promise.resolve(null);
|
|
19398
|
+
this.Events.trigger("debug", `Draining ${options.id}`, {
|
|
19399
|
+
args,
|
|
19400
|
+
options
|
|
19401
|
+
});
|
|
19402
|
+
index = this._randomIndex();
|
|
19403
|
+
return this._store.__register__(index, options.weight, options.expiration).then(({ success, wait, reservoir }) => {
|
|
19404
|
+
var empty;
|
|
19405
|
+
this.Events.trigger("debug", `Drained ${options.id}`, {
|
|
19406
|
+
success,
|
|
19407
|
+
args,
|
|
19408
|
+
options
|
|
19409
|
+
});
|
|
19410
|
+
if (success) {
|
|
19411
|
+
queue.shift();
|
|
19412
|
+
empty = this.empty();
|
|
19413
|
+
if (empty) this.Events.trigger("empty");
|
|
19414
|
+
if (reservoir === 0) this.Events.trigger("depleted", empty);
|
|
19415
|
+
this._run(index, next, wait);
|
|
19416
|
+
return this.Promise.resolve(options.weight);
|
|
19417
|
+
} else return this.Promise.resolve(null);
|
|
19418
|
+
});
|
|
19419
|
+
});
|
|
19420
|
+
}
|
|
19421
|
+
_drainAll(capacity, total = 0) {
|
|
19422
|
+
return this._drainOne(capacity).then((drained) => {
|
|
19423
|
+
var newCapacity;
|
|
19424
|
+
if (drained != null) {
|
|
19425
|
+
newCapacity = capacity != null ? capacity - drained : capacity;
|
|
19426
|
+
return this._drainAll(newCapacity, total + drained);
|
|
19427
|
+
} else return this.Promise.resolve(total);
|
|
19428
|
+
}).catch((e) => {
|
|
19429
|
+
return this.Events.trigger("error", e);
|
|
19430
|
+
});
|
|
19431
|
+
}
|
|
19432
|
+
_dropAllQueued(message) {
|
|
19433
|
+
return this._queues.shiftAll(function(job) {
|
|
19434
|
+
return job.doDrop({ message });
|
|
19435
|
+
});
|
|
19436
|
+
}
|
|
19437
|
+
stop(options = {}) {
|
|
19438
|
+
var done, waitForExecuting;
|
|
19439
|
+
options = parser$5.load(options, this.stopDefaults);
|
|
19440
|
+
waitForExecuting = (at) => {
|
|
19441
|
+
var finished = () => {
|
|
19442
|
+
var counts = this._states.counts;
|
|
19443
|
+
return counts[0] + counts[1] + counts[2] + counts[3] === at;
|
|
19444
|
+
};
|
|
19445
|
+
return new this.Promise((resolve, reject) => {
|
|
19446
|
+
if (finished()) return resolve();
|
|
19447
|
+
else return this.on("done", () => {
|
|
19448
|
+
if (finished()) {
|
|
19449
|
+
this.removeAllListeners("done");
|
|
19450
|
+
return resolve();
|
|
19451
|
+
}
|
|
19452
|
+
});
|
|
19453
|
+
});
|
|
19454
|
+
};
|
|
19455
|
+
done = options.dropWaitingJobs ? (this._run = function(index, next) {
|
|
19456
|
+
return next.doDrop({ message: options.dropErrorMessage });
|
|
19457
|
+
}, this._drainOne = () => {
|
|
19458
|
+
return this.Promise.resolve(null);
|
|
19459
|
+
}, this._registerLock.schedule(() => {
|
|
19460
|
+
return this._submitLock.schedule(() => {
|
|
19461
|
+
var k, ref = this._scheduled, v;
|
|
19462
|
+
for (k in ref) {
|
|
19463
|
+
v = ref[k];
|
|
19464
|
+
if (this.jobStatus(v.job.options.id) === "RUNNING") {
|
|
19465
|
+
clearTimeout(v.timeout);
|
|
19466
|
+
clearTimeout(v.expiration);
|
|
19467
|
+
v.job.doDrop({ message: options.dropErrorMessage });
|
|
19468
|
+
}
|
|
19469
|
+
}
|
|
19470
|
+
this._dropAllQueued(options.dropErrorMessage);
|
|
19471
|
+
return waitForExecuting(0);
|
|
19472
|
+
});
|
|
19473
|
+
})) : this.schedule({
|
|
19474
|
+
priority: NUM_PRIORITIES$1 - 1,
|
|
19475
|
+
weight: 0
|
|
19476
|
+
}, () => {
|
|
19477
|
+
return waitForExecuting(1);
|
|
19478
|
+
});
|
|
19479
|
+
this._receive = function(job) {
|
|
19480
|
+
return job._reject(new Bottleneck.prototype.BottleneckError(options.enqueueErrorMessage));
|
|
19481
|
+
};
|
|
19482
|
+
this.stop = () => {
|
|
19483
|
+
return this.Promise.reject(new Bottleneck.prototype.BottleneckError("stop() has already been called"));
|
|
19484
|
+
};
|
|
19485
|
+
return done;
|
|
19486
|
+
}
|
|
19487
|
+
async _addToQueue(job) {
|
|
19488
|
+
var args, blocked, error, options, reachedHWM, shifted, strategy;
|
|
19489
|
+
({args, options} = job);
|
|
19490
|
+
try {
|
|
19491
|
+
({reachedHWM, blocked, strategy} = await this._store.__submit__(this.queued(), options.weight));
|
|
19492
|
+
} catch (error1) {
|
|
19493
|
+
error = error1;
|
|
19494
|
+
this.Events.trigger("debug", `Could not queue ${options.id}`, {
|
|
19495
|
+
args,
|
|
19496
|
+
options,
|
|
19497
|
+
error
|
|
19498
|
+
});
|
|
19499
|
+
job.doDrop({ error });
|
|
19500
|
+
return false;
|
|
19501
|
+
}
|
|
19502
|
+
if (blocked) {
|
|
19503
|
+
job.doDrop();
|
|
19504
|
+
return true;
|
|
19505
|
+
} else if (reachedHWM) {
|
|
19506
|
+
shifted = strategy === Bottleneck.prototype.strategy.LEAK ? this._queues.shiftLastFrom(options.priority) : strategy === Bottleneck.prototype.strategy.OVERFLOW_PRIORITY ? this._queues.shiftLastFrom(options.priority + 1) : strategy === Bottleneck.prototype.strategy.OVERFLOW ? job : void 0;
|
|
19507
|
+
if (shifted != null) shifted.doDrop();
|
|
19508
|
+
if (shifted == null || strategy === Bottleneck.prototype.strategy.OVERFLOW) {
|
|
19509
|
+
if (shifted == null) job.doDrop();
|
|
19510
|
+
return reachedHWM;
|
|
19511
|
+
}
|
|
19512
|
+
}
|
|
19513
|
+
job.doQueue(reachedHWM, blocked);
|
|
19514
|
+
this._queues.push(job);
|
|
19515
|
+
await this._drainAll();
|
|
19516
|
+
return reachedHWM;
|
|
19517
|
+
}
|
|
19518
|
+
_receive(job) {
|
|
19519
|
+
if (this._states.jobStatus(job.options.id) != null) {
|
|
19520
|
+
job._reject(new Bottleneck.prototype.BottleneckError(`A job with the same id already exists (id=${job.options.id})`));
|
|
19521
|
+
return false;
|
|
19522
|
+
} else {
|
|
19523
|
+
job.doReceive();
|
|
19524
|
+
return this._submitLock.schedule(this._addToQueue, job);
|
|
19525
|
+
}
|
|
19526
|
+
}
|
|
19527
|
+
submit(...args) {
|
|
19528
|
+
var cb, fn, job, options, ref, ref1, task;
|
|
19529
|
+
if (typeof args[0] === "function") {
|
|
19530
|
+
ref = args, [fn, ...args] = ref, [cb] = splice.call(args, -1);
|
|
19531
|
+
options = parser$5.load({}, this.jobDefaults);
|
|
19532
|
+
} else {
|
|
19533
|
+
ref1 = args, [options, fn, ...args] = ref1, [cb] = splice.call(args, -1);
|
|
19534
|
+
options = parser$5.load(options, this.jobDefaults);
|
|
19535
|
+
}
|
|
19536
|
+
task = (...args) => {
|
|
19537
|
+
return new this.Promise(function(resolve, reject) {
|
|
19538
|
+
return fn(...args, function(...args) {
|
|
19539
|
+
return (args[0] != null ? reject : resolve)(args);
|
|
19540
|
+
});
|
|
19541
|
+
});
|
|
19542
|
+
};
|
|
19543
|
+
job = new Job$1(task, args, options, this.jobDefaults, this.rejectOnDrop, this.Events, this._states, this.Promise);
|
|
19544
|
+
job.promise.then(function(args) {
|
|
19545
|
+
return typeof cb === "function" ? cb(...args) : void 0;
|
|
19546
|
+
}).catch(function(args) {
|
|
19547
|
+
if (Array.isArray(args)) return typeof cb === "function" ? cb(...args) : void 0;
|
|
19548
|
+
else return typeof cb === "function" ? cb(args) : void 0;
|
|
19549
|
+
});
|
|
19550
|
+
return this._receive(job);
|
|
19551
|
+
}
|
|
19552
|
+
schedule(...args) {
|
|
19553
|
+
var job, options, task;
|
|
19554
|
+
if (typeof args[0] === "function") {
|
|
19555
|
+
[task, ...args] = args;
|
|
19556
|
+
options = {};
|
|
19557
|
+
} else [options, task, ...args] = args;
|
|
19558
|
+
job = new Job$1(task, args, options, this.jobDefaults, this.rejectOnDrop, this.Events, this._states, this.Promise);
|
|
19559
|
+
this._receive(job);
|
|
19560
|
+
return job.promise;
|
|
19561
|
+
}
|
|
19562
|
+
wrap(fn) {
|
|
19563
|
+
var schedule = this.schedule.bind(this), wrapped = function(...args) {
|
|
19564
|
+
return schedule(fn.bind(this), ...args);
|
|
19565
|
+
};
|
|
19566
|
+
wrapped.withOptions = function(options, ...args) {
|
|
19567
|
+
return schedule(options, fn, ...args);
|
|
19568
|
+
};
|
|
19569
|
+
return wrapped;
|
|
19570
|
+
}
|
|
19571
|
+
async updateSettings(options = {}) {
|
|
19572
|
+
await this._store.__updateSettings__(parser$5.overwrite(options, this.storeDefaults));
|
|
19573
|
+
parser$5.overwrite(options, this.instanceDefaults, this);
|
|
19574
|
+
return this;
|
|
19575
|
+
}
|
|
19576
|
+
currentReservoir() {
|
|
19577
|
+
return this._store.__currentReservoir__();
|
|
19578
|
+
}
|
|
19579
|
+
incrementReservoir(incr = 0) {
|
|
19580
|
+
return this._store.__incrementReservoir__(incr);
|
|
19581
|
+
}
|
|
19582
|
+
}
|
|
19583
|
+
Bottleneck.default = Bottleneck;
|
|
19584
|
+
Bottleneck.Events = Events$4;
|
|
19585
|
+
Bottleneck.version = Bottleneck.prototype.version = require$$8.version;
|
|
19586
|
+
Bottleneck.strategy = Bottleneck.prototype.strategy = {
|
|
19587
|
+
LEAK: 1,
|
|
19588
|
+
OVERFLOW: 2,
|
|
19589
|
+
OVERFLOW_PRIORITY: 4,
|
|
19590
|
+
BLOCK: 3
|
|
19591
|
+
};
|
|
19592
|
+
Bottleneck.BottleneckError = Bottleneck.prototype.BottleneckError = BottleneckError_1;
|
|
19593
|
+
Bottleneck.Group = Bottleneck.prototype.Group = Group_1;
|
|
19594
|
+
Bottleneck.RedisConnection = Bottleneck.prototype.RedisConnection = require$$2;
|
|
19595
|
+
Bottleneck.IORedisConnection = Bottleneck.prototype.IORedisConnection = require$$3;
|
|
19596
|
+
Bottleneck.Batcher = Bottleneck.prototype.Batcher = Batcher_1;
|
|
19597
|
+
Bottleneck.prototype.jobDefaults = {
|
|
19598
|
+
priority: DEFAULT_PRIORITY$1,
|
|
19599
|
+
weight: 1,
|
|
19600
|
+
expiration: null,
|
|
19601
|
+
id: "<no-id>"
|
|
19602
|
+
};
|
|
19603
|
+
Bottleneck.prototype.storeDefaults = {
|
|
19604
|
+
maxConcurrent: null,
|
|
19605
|
+
minTime: 0,
|
|
19606
|
+
highWater: null,
|
|
19607
|
+
strategy: Bottleneck.prototype.strategy.LEAK,
|
|
19608
|
+
penalty: null,
|
|
19609
|
+
reservoir: null,
|
|
19610
|
+
reservoirRefreshInterval: null,
|
|
19611
|
+
reservoirRefreshAmount: null,
|
|
19612
|
+
reservoirIncreaseInterval: null,
|
|
19613
|
+
reservoirIncreaseAmount: null,
|
|
19614
|
+
reservoirIncreaseMaximum: null
|
|
19615
|
+
};
|
|
19616
|
+
Bottleneck.prototype.localStoreDefaults = {
|
|
19617
|
+
Promise,
|
|
19618
|
+
timeout: null,
|
|
19619
|
+
heartbeatInterval: 250
|
|
19620
|
+
};
|
|
19621
|
+
Bottleneck.prototype.redisStoreDefaults = {
|
|
19622
|
+
Promise,
|
|
19623
|
+
timeout: null,
|
|
19624
|
+
heartbeatInterval: 5e3,
|
|
19625
|
+
clientTimeout: 1e4,
|
|
19626
|
+
Redis: null,
|
|
19627
|
+
clientOptions: {},
|
|
19628
|
+
clusterNodes: null,
|
|
19629
|
+
clearDatastore: false,
|
|
19630
|
+
connection: null
|
|
19631
|
+
};
|
|
19632
|
+
Bottleneck.prototype.instanceDefaults = {
|
|
19633
|
+
datastore: "local",
|
|
19634
|
+
connection: null,
|
|
19635
|
+
id: "<no-id>",
|
|
19636
|
+
rejectOnDrop: true,
|
|
19637
|
+
trackDoneStatus: false,
|
|
19638
|
+
Promise
|
|
19639
|
+
};
|
|
19640
|
+
Bottleneck.prototype.stopDefaults = {
|
|
19641
|
+
enqueueErrorMessage: "This limiter has been stopped and cannot accept new jobs.",
|
|
19642
|
+
dropWaitingJobs: true,
|
|
19643
|
+
dropErrorMessage: "This limiter has been stopped."
|
|
19644
|
+
};
|
|
19645
|
+
return Bottleneck;
|
|
19646
|
+
}).call(commonjsGlobal);
|
|
19647
|
+
var Bottleneck_1 = Bottleneck;
|
|
19648
|
+
return Bottleneck_1;
|
|
19649
|
+
}));
|
|
19650
|
+
}));
|
|
19651
|
+
|
|
19652
|
+
//#endregion
|
|
19653
|
+
//#region ../../node_modules/@octokit/plugin-throttling/dist-bundle/index.js
|
|
19654
|
+
var import_light = /* @__PURE__ */ __toESM(require_light(), 1);
|
|
19655
|
+
var VERSION$1 = "0.0.0-development";
|
|
19656
|
+
var noop = () => Promise.resolve();
|
|
19657
|
+
function wrapRequest$1(state, request, options) {
|
|
19658
|
+
return state.retryLimiter.schedule(doRequest, state, request, options);
|
|
19659
|
+
}
|
|
19660
|
+
async function doRequest(state, request, options) {
|
|
19661
|
+
const { pathname } = new URL(options.url, "http://github.test");
|
|
19662
|
+
const isAuth = isAuthRequest(options.method, pathname);
|
|
19663
|
+
const isWrite = !isAuth && options.method !== "GET" && options.method !== "HEAD";
|
|
19664
|
+
const isSearch = options.method === "GET" && pathname.startsWith("/search/");
|
|
19665
|
+
const isGraphQL = pathname.startsWith("/graphql");
|
|
19666
|
+
const jobOptions = ~~request.retryCount > 0 ? {
|
|
19667
|
+
priority: 0,
|
|
19668
|
+
weight: 0
|
|
19669
|
+
} : {};
|
|
19670
|
+
if (state.clustering) jobOptions.expiration = 1e3 * 60;
|
|
19671
|
+
if (isWrite || isGraphQL) await state.write.key(state.id).schedule(jobOptions, noop);
|
|
19672
|
+
if (isWrite && state.triggersNotification(pathname)) await state.notifications.key(state.id).schedule(jobOptions, noop);
|
|
19673
|
+
if (isSearch) await state.search.key(state.id).schedule(jobOptions, noop);
|
|
19674
|
+
const req = (isAuth ? state.auth : state.global).key(state.id).schedule(jobOptions, request, options);
|
|
19675
|
+
if (isGraphQL) {
|
|
19676
|
+
const res = await req;
|
|
19677
|
+
if (res.data.errors != null && res.data.errors.some((error) => error.type === "RATE_LIMITED")) throw Object.assign(/* @__PURE__ */ new Error("GraphQL Rate Limit Exceeded"), {
|
|
19678
|
+
response: res,
|
|
19679
|
+
data: res.data
|
|
19680
|
+
});
|
|
19681
|
+
}
|
|
19682
|
+
return req;
|
|
19683
|
+
}
|
|
19684
|
+
function isAuthRequest(method, pathname) {
|
|
19685
|
+
return method === "PATCH" && /^\/applications\/[^/]+\/token\/scoped$/.test(pathname) || method === "POST" && (/^\/applications\/[^/]+\/token$/.test(pathname) || /^\/app\/installations\/[^/]+\/access_tokens$/.test(pathname) || pathname === "/login/oauth/access_token");
|
|
19686
|
+
}
|
|
19687
|
+
var triggers_notification_paths_default = [
|
|
19688
|
+
"/orgs/{org}/invitations",
|
|
19689
|
+
"/orgs/{org}/invitations/{invitation_id}",
|
|
19690
|
+
"/orgs/{org}/teams/{team_slug}/discussions",
|
|
19691
|
+
"/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments",
|
|
19692
|
+
"/repos/{owner}/{repo}/collaborators/{username}",
|
|
19693
|
+
"/repos/{owner}/{repo}/commits/{commit_sha}/comments",
|
|
19694
|
+
"/repos/{owner}/{repo}/issues",
|
|
19695
|
+
"/repos/{owner}/{repo}/issues/{issue_number}/comments",
|
|
19696
|
+
"/repos/{owner}/{repo}/issues/{issue_number}/sub_issue",
|
|
19697
|
+
"/repos/{owner}/{repo}/issues/{issue_number}/sub_issues/priority",
|
|
19698
|
+
"/repos/{owner}/{repo}/pulls",
|
|
19699
|
+
"/repos/{owner}/{repo}/pulls/{pull_number}/comments",
|
|
19700
|
+
"/repos/{owner}/{repo}/pulls/{pull_number}/comments/{comment_id}/replies",
|
|
19701
|
+
"/repos/{owner}/{repo}/pulls/{pull_number}/merge",
|
|
19702
|
+
"/repos/{owner}/{repo}/pulls/{pull_number}/requested_reviewers",
|
|
19703
|
+
"/repos/{owner}/{repo}/pulls/{pull_number}/reviews",
|
|
19704
|
+
"/repos/{owner}/{repo}/releases",
|
|
19705
|
+
"/teams/{team_id}/discussions",
|
|
19706
|
+
"/teams/{team_id}/discussions/{discussion_number}/comments"
|
|
19707
|
+
];
|
|
19708
|
+
function routeMatcher(paths) {
|
|
19709
|
+
const regex2 = `^(?:${paths.map((path) => path.split("/").map((c) => c.startsWith("{") ? "(?:.+?)" : c).join("/")).map((r) => `(?:${r})`).join("|")})[^/]*$`;
|
|
19710
|
+
return new RegExp(regex2, "i");
|
|
19711
|
+
}
|
|
19712
|
+
var regex = routeMatcher(triggers_notification_paths_default);
|
|
19713
|
+
var triggersNotification = regex.test.bind(regex);
|
|
19714
|
+
var groups = {};
|
|
19715
|
+
var createGroups = function(Bottleneck, common) {
|
|
19716
|
+
groups.global = new Bottleneck.Group({
|
|
19717
|
+
id: "octokit-global",
|
|
19718
|
+
maxConcurrent: 10,
|
|
19719
|
+
...common
|
|
19720
|
+
});
|
|
19721
|
+
groups.auth = new Bottleneck.Group({
|
|
19722
|
+
id: "octokit-auth",
|
|
19723
|
+
maxConcurrent: 1,
|
|
19724
|
+
...common
|
|
19725
|
+
});
|
|
19726
|
+
groups.search = new Bottleneck.Group({
|
|
19727
|
+
id: "octokit-search",
|
|
19728
|
+
maxConcurrent: 1,
|
|
19729
|
+
minTime: 2e3,
|
|
19730
|
+
...common
|
|
19731
|
+
});
|
|
19732
|
+
groups.write = new Bottleneck.Group({
|
|
19733
|
+
id: "octokit-write",
|
|
19734
|
+
maxConcurrent: 1,
|
|
19735
|
+
minTime: 1e3,
|
|
19736
|
+
...common
|
|
19737
|
+
});
|
|
19738
|
+
groups.notifications = new Bottleneck.Group({
|
|
19739
|
+
id: "octokit-notifications",
|
|
19740
|
+
maxConcurrent: 1,
|
|
19741
|
+
minTime: 3e3,
|
|
19742
|
+
...common
|
|
19743
|
+
});
|
|
19744
|
+
};
|
|
19745
|
+
function throttling(octokit, octokitOptions) {
|
|
19746
|
+
const { enabled = true, Bottleneck = import_light.default, id = "no-id", timeout = 1e3 * 60 * 2, connection } = octokitOptions.throttle || {};
|
|
19747
|
+
if (!enabled) return {};
|
|
19748
|
+
const common = { timeout };
|
|
19749
|
+
if (typeof connection !== "undefined") common.connection = connection;
|
|
19750
|
+
if (groups.global == null) createGroups(Bottleneck, common);
|
|
19751
|
+
const state = Object.assign({
|
|
19752
|
+
clustering: connection != null,
|
|
19753
|
+
triggersNotification,
|
|
19754
|
+
fallbackSecondaryRateRetryAfter: 60,
|
|
19755
|
+
retryAfterBaseValue: 1e3,
|
|
19756
|
+
retryLimiter: new Bottleneck(),
|
|
19757
|
+
id,
|
|
19758
|
+
...groups
|
|
19759
|
+
}, octokitOptions.throttle);
|
|
19760
|
+
if (typeof state.onSecondaryRateLimit !== "function" || typeof state.onRateLimit !== "function") throw new Error(`octokit/plugin-throttling error:
|
|
19761
|
+
You must pass the onSecondaryRateLimit and onRateLimit error handlers.
|
|
19762
|
+
See https://octokit.github.io/rest.js/#throttling
|
|
19763
|
+
|
|
19764
|
+
const octokit = new Octokit({
|
|
19765
|
+
throttle: {
|
|
19766
|
+
onSecondaryRateLimit: (retryAfter, options) => {/* ... */},
|
|
19767
|
+
onRateLimit: (retryAfter, options) => {/* ... */}
|
|
19768
|
+
}
|
|
19769
|
+
})
|
|
19770
|
+
`);
|
|
19771
|
+
const events = {};
|
|
19772
|
+
const emitter = new Bottleneck.Events(events);
|
|
19773
|
+
events.on("secondary-limit", state.onSecondaryRateLimit);
|
|
19774
|
+
events.on("rate-limit", state.onRateLimit);
|
|
19775
|
+
events.on("error", (e) => octokit.log.warn("Error in throttling-plugin limit handler", e));
|
|
19776
|
+
state.retryLimiter.on("failed", async function(error, info) {
|
|
19777
|
+
const [state2, request, options] = info.args;
|
|
19778
|
+
const { pathname } = new URL(options.url, "http://github.test");
|
|
19779
|
+
if (!(pathname.startsWith("/graphql") && error.status !== 401 || error.status === 403 || error.status === 429)) return;
|
|
19780
|
+
const retryCount = ~~request.retryCount;
|
|
19781
|
+
request.retryCount = retryCount;
|
|
19782
|
+
options.request.retryCount = retryCount;
|
|
19783
|
+
const { wantRetry, retryAfter = 0 } = await (async function() {
|
|
19784
|
+
if (/\bsecondary rate\b/i.test(error.message)) {
|
|
19785
|
+
const retryAfter2 = Number(error.response.headers["retry-after"]) || state2.fallbackSecondaryRateRetryAfter;
|
|
19786
|
+
return {
|
|
19787
|
+
wantRetry: await emitter.trigger("secondary-limit", retryAfter2, options, octokit, retryCount),
|
|
19788
|
+
retryAfter: retryAfter2
|
|
19789
|
+
};
|
|
19790
|
+
}
|
|
19791
|
+
if (error.response.headers != null && error.response.headers["x-ratelimit-remaining"] === "0" || (error.response.data?.errors ?? []).some((error2) => error2.type === "RATE_LIMITED")) {
|
|
19792
|
+
const rateLimitReset = (/* @__PURE__ */ new Date(~~error.response.headers["x-ratelimit-reset"] * 1e3)).getTime();
|
|
19793
|
+
const retryAfter2 = Math.max(Math.ceil((rateLimitReset - Date.now()) / 1e3) + 1, 0);
|
|
19794
|
+
return {
|
|
19795
|
+
wantRetry: await emitter.trigger("rate-limit", retryAfter2, options, octokit, retryCount),
|
|
19796
|
+
retryAfter: retryAfter2
|
|
19797
|
+
};
|
|
19798
|
+
}
|
|
19799
|
+
return {};
|
|
19800
|
+
})();
|
|
19801
|
+
if (wantRetry) {
|
|
19802
|
+
request.retryCount++;
|
|
19803
|
+
return retryAfter * state2.retryAfterBaseValue;
|
|
19804
|
+
}
|
|
19805
|
+
});
|
|
19806
|
+
octokit.hook.wrap("request", wrapRequest$1.bind(null, state));
|
|
19807
|
+
return {};
|
|
19808
|
+
}
|
|
19809
|
+
throttling.VERSION = VERSION$1;
|
|
19810
|
+
throttling.triggersNotification = triggersNotification;
|
|
19811
|
+
|
|
19812
|
+
//#endregion
|
|
19813
|
+
//#region ../../node_modules/@octokit/plugin-retry/dist-bundle/index.js
|
|
19814
|
+
var VERSION = "0.0.0-development";
|
|
19815
|
+
function isRequestError(error) {
|
|
19816
|
+
return error.request !== void 0;
|
|
19817
|
+
}
|
|
19818
|
+
async function errorRequest(state, octokit, error, options) {
|
|
19819
|
+
if (!isRequestError(error) || !error?.request.request) throw error;
|
|
19820
|
+
if (error.status >= 400 && !state.doNotRetry.includes(error.status)) {
|
|
19821
|
+
const retries = options.request.retries != null ? options.request.retries : state.retries;
|
|
19822
|
+
const retryAfter = Math.pow((options.request.retryCount || 0) + 1, 2);
|
|
19823
|
+
throw octokit.retry.retryRequest(error, retries, retryAfter);
|
|
19824
|
+
}
|
|
19825
|
+
throw error;
|
|
19826
|
+
}
|
|
19827
|
+
async function wrapRequest(state, octokit, request, options) {
|
|
19828
|
+
const limiter = new import_light.default();
|
|
19829
|
+
limiter.on("failed", function(error, info) {
|
|
19830
|
+
const maxRetries = ~~error.request.request?.retries;
|
|
19831
|
+
const after = ~~error.request.request?.retryAfter;
|
|
19832
|
+
options.request.retryCount = info.retryCount + 1;
|
|
19833
|
+
if (maxRetries > info.retryCount) return after * state.retryAfterBaseValue;
|
|
19834
|
+
});
|
|
19835
|
+
return limiter.schedule(requestWithGraphqlErrorHandling.bind(null, state, octokit, request), options);
|
|
19836
|
+
}
|
|
19837
|
+
async function requestWithGraphqlErrorHandling(state, octokit, request, options) {
|
|
19838
|
+
const response = await request(options);
|
|
19839
|
+
if (response.data && response.data.errors && response.data.errors.length > 0 && /Something went wrong while executing your query/.test(response.data.errors[0].message)) return errorRequest(state, octokit, new RequestError(response.data.errors[0].message, 500, {
|
|
19840
|
+
request: options,
|
|
19841
|
+
response
|
|
19842
|
+
}), options);
|
|
19843
|
+
return response;
|
|
19844
|
+
}
|
|
19845
|
+
function retry(octokit, octokitOptions) {
|
|
19846
|
+
const state = Object.assign({
|
|
19847
|
+
enabled: true,
|
|
19848
|
+
retryAfterBaseValue: 1e3,
|
|
19849
|
+
doNotRetry: [
|
|
19850
|
+
400,
|
|
19851
|
+
401,
|
|
19852
|
+
403,
|
|
19853
|
+
404,
|
|
19854
|
+
410,
|
|
19855
|
+
422,
|
|
19856
|
+
451
|
|
19857
|
+
],
|
|
19858
|
+
retries: 3
|
|
19859
|
+
}, octokitOptions.retry);
|
|
19860
|
+
const retryPlugin = { retry: { retryRequest: (error, retries, retryAfter) => {
|
|
19861
|
+
error.request.request = Object.assign({}, error.request.request, {
|
|
19862
|
+
retries,
|
|
19863
|
+
retryAfter
|
|
19864
|
+
});
|
|
19865
|
+
return error;
|
|
19866
|
+
} } };
|
|
19867
|
+
if (state.enabled) {
|
|
19868
|
+
octokit.hook.error("request", errorRequest.bind(null, state, retryPlugin));
|
|
19869
|
+
octokit.hook.wrap("request", wrapRequest.bind(null, state, retryPlugin));
|
|
19870
|
+
}
|
|
19871
|
+
return retryPlugin;
|
|
19872
|
+
}
|
|
19873
|
+
retry.VERSION = VERSION;
|
|
19874
|
+
|
|
19875
|
+
//#endregion
|
|
19876
|
+
//#region src/github/client.ts
|
|
19877
|
+
/**
|
|
19878
|
+
* GitHub Client — Octokit adapter with auth gate and error wrapping
|
|
19879
|
+
*
|
|
19880
|
+
* Provides a configured Octokit singleton with throttling + retry plugins.
|
|
19881
|
+
* Uses `gh auth token` for authentication (fetched once per process).
|
|
19882
|
+
*
|
|
19883
|
+
* CRITICAL: This module replaces gh.ts as the primary GitHub API layer.
|
|
19884
|
+
* CRITICAL: Never call process.exit() — throw AuthError or return GhResult.
|
|
19885
|
+
*/
|
|
19886
|
+
const execFileAsync = (0, node_util.promisify)(node_child_process.execFile);
|
|
19887
|
+
const ThrottledOctokit = Octokit.plugin(throttling, retry);
|
|
19888
|
+
|
|
19889
|
+
//#endregion
|
|
19890
|
+
//#region src/github/mapping.ts
|
|
19891
|
+
/**
|
|
19892
|
+
* GitHub Issue Mapping — Local performance cache
|
|
19893
|
+
*
|
|
19894
|
+
* IMPORTANT: This file (.planning/github-issues.json) is a CACHE that can be
|
|
19895
|
+
* rebuilt from GitHub Issues at any time via rebuildMappingFromGitHub().
|
|
19896
|
+
* GitHub Issues are the single source of truth (ARCH-01).
|
|
19897
|
+
*
|
|
19898
|
+
* Manages the `.planning/github-issues.json` file that maps MAXSIM tasks/todos
|
|
19899
|
+
* to their corresponding GitHub issue numbers, internal IDs, and project item IDs.
|
|
19900
|
+
*
|
|
19901
|
+
* All file operations use synchronous fs (matching the pattern in existing core modules).
|
|
19902
|
+
* Uses planningPath() from core to construct file paths.
|
|
19903
|
+
*
|
|
19904
|
+
* CRITICAL: Never call process.exit() — throw or return null instead.
|
|
19905
|
+
*/
|
|
19906
|
+
const MAPPING_FILENAME = "github-issues.json";
|
|
19907
|
+
/**
|
|
19908
|
+
* Get the absolute path to `.planning/github-issues.json` for a given cwd.
|
|
19909
|
+
*/
|
|
19910
|
+
function mappingFilePath(cwd) {
|
|
19911
|
+
return planningPath(cwd, MAPPING_FILENAME);
|
|
19912
|
+
}
|
|
19913
|
+
/**
|
|
19914
|
+
* Load and parse the mapping file (local cache).
|
|
19915
|
+
*
|
|
19916
|
+
* Returns null if the file does not exist.
|
|
19917
|
+
* Throws on malformed JSON or invalid structure (missing required fields).
|
|
19918
|
+
*/
|
|
19919
|
+
function loadMapping(cwd) {
|
|
19920
|
+
const filePath = mappingFilePath(cwd);
|
|
19921
|
+
try {
|
|
19922
|
+
node_fs.default.statSync(filePath);
|
|
19923
|
+
} catch {
|
|
19924
|
+
return null;
|
|
19925
|
+
}
|
|
19926
|
+
const raw = node_fs.default.readFileSync(filePath, "utf-8");
|
|
19927
|
+
const parsed = JSON.parse(raw);
|
|
19928
|
+
if (typeof parsed.repo !== "string") throw new Error(`Invalid github-issues.json: missing required field 'repo' (string)`);
|
|
19929
|
+
return parsed;
|
|
19930
|
+
}
|
|
19931
|
+
|
|
16075
19932
|
//#endregion
|
|
16076
19933
|
//#region src/core/init.ts
|
|
16077
19934
|
/**
|
|
@@ -16079,6 +19936,27 @@ function listAvailableTemplates() {
|
|
|
16079
19936
|
*
|
|
16080
19937
|
* Ported from maxsim/bin/lib/init.cjs
|
|
16081
19938
|
*/
|
|
19939
|
+
function getGitHubContext(cwd) {
|
|
19940
|
+
try {
|
|
19941
|
+
const mapping = loadMapping(cwd);
|
|
19942
|
+
if (!mapping || !mapping.project_number) return {
|
|
19943
|
+
github_ready: false,
|
|
19944
|
+
project_number: null,
|
|
19945
|
+
mapping: null
|
|
19946
|
+
};
|
|
19947
|
+
return {
|
|
19948
|
+
github_ready: true,
|
|
19949
|
+
project_number: mapping.project_number,
|
|
19950
|
+
mapping
|
|
19951
|
+
};
|
|
19952
|
+
} catch {
|
|
19953
|
+
return {
|
|
19954
|
+
github_ready: false,
|
|
19955
|
+
project_number: null,
|
|
19956
|
+
mapping: null
|
|
19957
|
+
};
|
|
19958
|
+
}
|
|
19959
|
+
}
|
|
16082
19960
|
async function extractReqIds(cwd, phase) {
|
|
16083
19961
|
const reqMatch = (await getRoadmapPhaseInternal(cwd, phase))?.section?.match(/^\*\*Requirements\*\*:[^\S\n]*([^\n]*)$/m);
|
|
16084
19962
|
const reqExtracted = reqMatch ? reqMatch[1].replace(/[\[\]]/g, "").split(",").map((s) => s.trim()).filter(Boolean).join(", ") : null;
|
|
@@ -16142,6 +20020,9 @@ async function cmdInitExecutePhase(cwd, phase) {
|
|
|
16142
20020
|
const phaseInfo = await findPhaseInternal(cwd, phase);
|
|
16143
20021
|
const milestone = await getMilestoneInfo(cwd);
|
|
16144
20022
|
const phase_req_ids = await extractReqIds(cwd, phase);
|
|
20023
|
+
const ghCtx = getGitHubContext(cwd);
|
|
20024
|
+
const phaseNum = phaseInfo?.phase_number ?? phase;
|
|
20025
|
+
const phaseMapping = ghCtx.mapping?.phases[phaseNum] ?? null;
|
|
16145
20026
|
return cmdOk({
|
|
16146
20027
|
executor_model: await resolveModelInternal(cwd, "executor"),
|
|
16147
20028
|
verifier_model: await resolveModelInternal(cwd, "verifier"),
|
|
@@ -16179,7 +20060,17 @@ async function cmdInitExecutePhase(cwd, phase) {
|
|
|
16179
20060
|
code_review: true,
|
|
16180
20061
|
simplify_review: true,
|
|
16181
20062
|
retry_limit: 3
|
|
16182
|
-
}
|
|
20063
|
+
},
|
|
20064
|
+
github_ready: ghCtx.github_ready,
|
|
20065
|
+
project_number: ghCtx.project_number,
|
|
20066
|
+
phase_issue_number: phaseMapping?.tracking_issue.number ?? null,
|
|
20067
|
+
phase_item_id: phaseMapping?.tracking_issue.item_id ?? null,
|
|
20068
|
+
task_mappings: phaseMapping?.tasks ? Object.fromEntries(Object.entries(phaseMapping.tasks).map(([k, v]) => [k, {
|
|
20069
|
+
number: v.number,
|
|
20070
|
+
id: v.id,
|
|
20071
|
+
item_id: v.item_id,
|
|
20072
|
+
status: v.status
|
|
20073
|
+
}])) : null
|
|
16183
20074
|
});
|
|
16184
20075
|
}
|
|
16185
20076
|
async function cmdInitPlanPhase(cwd, phase) {
|
|
@@ -16187,6 +20078,9 @@ async function cmdInitPlanPhase(cwd, phase) {
|
|
|
16187
20078
|
const config = await loadConfig(cwd);
|
|
16188
20079
|
const phaseInfo = await findPhaseInternal(cwd, phase);
|
|
16189
20080
|
const phase_req_ids = await extractReqIds(cwd, phase);
|
|
20081
|
+
const ghCtx = getGitHubContext(cwd);
|
|
20082
|
+
const phaseNum = phaseInfo?.phase_number ?? phase;
|
|
20083
|
+
const phaseMapping = ghCtx.mapping?.phases[phaseNum] ?? null;
|
|
16190
20084
|
const result = {
|
|
16191
20085
|
researcher_model: await resolveModelInternal(cwd, "researcher"),
|
|
16192
20086
|
planner_model: await resolveModelInternal(cwd, "planner"),
|
|
@@ -16209,7 +20103,11 @@ async function cmdInitPlanPhase(cwd, phase) {
|
|
|
16209
20103
|
roadmap_exists: await pathExistsInternal(planningPath(cwd, "ROADMAP.md")),
|
|
16210
20104
|
state_path: ".planning/STATE.md",
|
|
16211
20105
|
roadmap_path: ".planning/ROADMAP.md",
|
|
16212
|
-
requirements_path: ".planning/REQUIREMENTS.md"
|
|
20106
|
+
requirements_path: ".planning/REQUIREMENTS.md",
|
|
20107
|
+
github_ready: ghCtx.github_ready,
|
|
20108
|
+
project_number: ghCtx.project_number,
|
|
20109
|
+
phase_issue_number: phaseMapping?.tracking_issue.number ?? null,
|
|
20110
|
+
phase_item_id: phaseMapping?.tracking_issue.item_id ?? null
|
|
16213
20111
|
};
|
|
16214
20112
|
if (await pathExistsInternal(planningPath(cwd, "CONVENTIONS.md"))) result.conventions_path = ".planning/CONVENTIONS.md";
|
|
16215
20113
|
if (phaseInfo?.directory) {
|
|
@@ -16229,6 +20127,28 @@ async function cmdInitNewProject(cwd) {
|
|
|
16229
20127
|
const hasCode = findCodeFiles(cwd).length > 0;
|
|
16230
20128
|
const hasPackageFile = await pathExistsInternal(node_path.default.join(cwd, "package.json")) || await pathExistsInternal(node_path.default.join(cwd, "requirements.txt")) || await pathExistsInternal(node_path.default.join(cwd, "Cargo.toml")) || await pathExistsInternal(node_path.default.join(cwd, "go.mod")) || await pathExistsInternal(node_path.default.join(cwd, "Package.swift"));
|
|
16231
20129
|
const hasCodebaseMap = await pathExistsInternal(planningPath(cwd, "codebase"));
|
|
20130
|
+
const ghCtx = getGitHubContext(cwd);
|
|
20131
|
+
let hasGitHubRemote = false;
|
|
20132
|
+
try {
|
|
20133
|
+
const { spawnSync } = await import("node:child_process");
|
|
20134
|
+
const remoteResult = spawnSync("git", [
|
|
20135
|
+
"remote",
|
|
20136
|
+
"get-url",
|
|
20137
|
+
"origin"
|
|
20138
|
+
], {
|
|
20139
|
+
cwd,
|
|
20140
|
+
encoding: "utf-8"
|
|
20141
|
+
});
|
|
20142
|
+
hasGitHubRemote = remoteResult.status === 0 && !!remoteResult.stdout.trim();
|
|
20143
|
+
} catch {}
|
|
20144
|
+
let ghAuthenticated = false;
|
|
20145
|
+
try {
|
|
20146
|
+
const { spawnSync } = await import("node:child_process");
|
|
20147
|
+
ghAuthenticated = spawnSync("gh", ["auth", "status"], {
|
|
20148
|
+
cwd,
|
|
20149
|
+
encoding: "utf-8"
|
|
20150
|
+
}).status === 0;
|
|
20151
|
+
} catch {}
|
|
16232
20152
|
return cmdOk({
|
|
16233
20153
|
researcher_model: await resolveModelInternal(cwd, "researcher"),
|
|
16234
20154
|
synthesizer_model: await resolveModelInternal(cwd, "researcher"),
|
|
@@ -16243,7 +20163,10 @@ async function cmdInitNewProject(cwd) {
|
|
|
16243
20163
|
needs_codebase_map: (hasCode || hasPackageFile) && !hasCodebaseMap,
|
|
16244
20164
|
has_git: await pathExistsInternal(node_path.default.join(cwd, ".git")),
|
|
16245
20165
|
brave_search_available: hasBraveSearch,
|
|
16246
|
-
project_path: ".planning/PROJECT.md"
|
|
20166
|
+
project_path: ".planning/PROJECT.md",
|
|
20167
|
+
github_ready: ghCtx.github_ready,
|
|
20168
|
+
has_github_remote: hasGitHubRemote,
|
|
20169
|
+
gh_authenticated: ghAuthenticated
|
|
16247
20170
|
});
|
|
16248
20171
|
}
|
|
16249
20172
|
async function cmdInitNewMilestone(cwd) {
|
|
@@ -16501,6 +20424,28 @@ async function cmdInitExisting(cwd) {
|
|
|
16501
20424
|
} catch (e) {
|
|
16502
20425
|
debugLog(e);
|
|
16503
20426
|
}
|
|
20427
|
+
const ghCtx = getGitHubContext(cwd);
|
|
20428
|
+
let hasGitHubRemote = false;
|
|
20429
|
+
try {
|
|
20430
|
+
const { spawnSync } = await import("node:child_process");
|
|
20431
|
+
const remoteResult = spawnSync("git", [
|
|
20432
|
+
"remote",
|
|
20433
|
+
"get-url",
|
|
20434
|
+
"origin"
|
|
20435
|
+
], {
|
|
20436
|
+
cwd,
|
|
20437
|
+
encoding: "utf-8"
|
|
20438
|
+
});
|
|
20439
|
+
hasGitHubRemote = remoteResult.status === 0 && !!remoteResult.stdout.trim();
|
|
20440
|
+
} catch {}
|
|
20441
|
+
let ghAuthenticated = false;
|
|
20442
|
+
try {
|
|
20443
|
+
const { spawnSync } = await import("node:child_process");
|
|
20444
|
+
ghAuthenticated = spawnSync("gh", ["auth", "status"], {
|
|
20445
|
+
cwd,
|
|
20446
|
+
encoding: "utf-8"
|
|
20447
|
+
}).status === 0;
|
|
20448
|
+
} catch {}
|
|
16504
20449
|
return cmdOk({
|
|
16505
20450
|
researcher_model: await resolveModelInternal(cwd, "researcher"),
|
|
16506
20451
|
synthesizer_model: await resolveModelInternal(cwd, "researcher"),
|
|
@@ -16520,12 +20465,16 @@ async function cmdInitExisting(cwd) {
|
|
|
16520
20465
|
brave_search_available: hasBraveSearch,
|
|
16521
20466
|
parallelization: config.parallelization,
|
|
16522
20467
|
project_path: ".planning/PROJECT.md",
|
|
16523
|
-
codebase_dir: ".planning/codebase"
|
|
20468
|
+
codebase_dir: ".planning/codebase",
|
|
20469
|
+
github_ready: ghCtx.github_ready,
|
|
20470
|
+
has_github_remote: hasGitHubRemote,
|
|
20471
|
+
gh_authenticated: ghAuthenticated
|
|
16524
20472
|
});
|
|
16525
20473
|
}
|
|
16526
20474
|
async function cmdInitProgress(cwd) {
|
|
16527
20475
|
const config = await loadConfig(cwd);
|
|
16528
20476
|
const milestone = await getMilestoneInfo(cwd);
|
|
20477
|
+
const ghCtx = getGitHubContext(cwd);
|
|
16529
20478
|
const progressPhasesDir = phasesPath(cwd);
|
|
16530
20479
|
const phases = [];
|
|
16531
20480
|
let currentPhase = null;
|
|
@@ -16585,7 +20534,13 @@ async function cmdInitProgress(cwd) {
|
|
|
16585
20534
|
state_path: ".planning/STATE.md",
|
|
16586
20535
|
roadmap_path: ".planning/ROADMAP.md",
|
|
16587
20536
|
project_path: ".planning/PROJECT.md",
|
|
16588
|
-
config_path: ".planning/config.json"
|
|
20537
|
+
config_path: ".planning/config.json",
|
|
20538
|
+
github_ready: ghCtx.github_ready,
|
|
20539
|
+
project_number: ghCtx.project_number,
|
|
20540
|
+
phase_mappings: ghCtx.mapping ? Object.fromEntries(Object.entries(ghCtx.mapping.phases).map(([phaseNum, phaseMap]) => [phaseNum, {
|
|
20541
|
+
issue_number: phaseMap.tracking_issue.number,
|
|
20542
|
+
item_id: phaseMap.tracking_issue.item_id
|
|
20543
|
+
}])) : null
|
|
16589
20544
|
});
|
|
16590
20545
|
}
|
|
16591
20546
|
/**
|