- adjust things to have fallback to empty string as octocit changed nullability
- recompile dist
This commit is contained in:
+439
-140
@@ -73,14 +73,17 @@ class Commits {
|
||||
compareHead = `${commits[0].sha}^`;
|
||||
}
|
||||
core.info(`ℹ️ Found ${commits.length} commits from the GitHub API for ${owner}/${repo}`);
|
||||
return commits.map(commit => ({
|
||||
sha: commit.sha,
|
||||
summary: commit.commit.message.split('\n')[0],
|
||||
message: commit.commit.message,
|
||||
date: moment_1.default(commit.commit.committer.date),
|
||||
author: commit.commit.author.name,
|
||||
prNumber: undefined
|
||||
}));
|
||||
return commits.filter(commit => commit.sha).map(commit => {
|
||||
var _a, _b;
|
||||
return ({
|
||||
sha: commit.sha || "",
|
||||
summary: commit.commit.message.split('\n')[0],
|
||||
message: commit.commit.message,
|
||||
date: moment_1.default((_a = commit.commit.committer) === null || _a === void 0 ? void 0 : _a.date),
|
||||
author: ((_b = commit.commit.author) === null || _b === void 0 ? void 0 : _b.name) || "",
|
||||
prNumber: undefined
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
sortCommits(commits) {
|
||||
@@ -389,7 +392,7 @@ class PullRequests {
|
||||
this.octokit = octokit;
|
||||
}
|
||||
getSingle(owner, repo, prNumber) {
|
||||
var _a, _b, _c;
|
||||
var _a, _b, _c, _d, _e;
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
try {
|
||||
const pr = yield this.octokit.pulls.get({
|
||||
@@ -402,20 +405,20 @@ class PullRequests {
|
||||
title: pr.data.title,
|
||||
htmlURL: pr.data.html_url,
|
||||
mergedAt: moment_1.default(pr.data.merged_at),
|
||||
mergeCommitSha: pr.data.merge_commit_sha,
|
||||
author: pr.data.user.login,
|
||||
mergeCommitSha: pr.data.merge_commit_sha || "",
|
||||
author: ((_a = pr.data.user) === null || _a === void 0 ? void 0 : _a.login) || "",
|
||||
repoName: pr.data.base.repo.full_name,
|
||||
labels: pr.data.labels.map(function (label) {
|
||||
return label.name;
|
||||
}),
|
||||
milestone: (_a = pr.data.milestone) === null || _a === void 0 ? void 0 : _a.title,
|
||||
body: pr.data.body,
|
||||
assignees: (_b = pr.data.assignees) === null || _b === void 0 ? void 0 : _b.map(function (asignee) {
|
||||
return asignee.login;
|
||||
}),
|
||||
requestedReviewers: (_c = pr.data.requested_reviewers) === null || _c === void 0 ? void 0 : _c.map(function (reviewer) {
|
||||
return reviewer.login;
|
||||
})
|
||||
labels: ((_b = pr.data.labels) === null || _b === void 0 ? void 0 : _b.map(function (label) {
|
||||
return label.name || "";
|
||||
})) || [],
|
||||
milestone: ((_c = pr.data.milestone) === null || _c === void 0 ? void 0 : _c.title) || "",
|
||||
body: pr.data.body || "",
|
||||
assignees: ((_d = pr.data.assignees) === null || _d === void 0 ? void 0 : _d.map(function (asignee) {
|
||||
return (asignee === null || asignee === void 0 ? void 0 : asignee.login) || "";
|
||||
})) || [],
|
||||
requestedReviewers: ((_e = pr.data.requested_reviewers) === null || _e === void 0 ? void 0 : _e.map(function (reviewer) {
|
||||
return (reviewer === null || reviewer === void 0 ? void 0 : reviewer.login) || "";
|
||||
})) || []
|
||||
};
|
||||
}
|
||||
catch (e) {
|
||||
@@ -426,7 +429,7 @@ class PullRequests {
|
||||
}
|
||||
getBetweenDates(owner, repo, fromDate, toDate, maxPullRequests) {
|
||||
var e_1, _a;
|
||||
var _b, _c, _d, _e;
|
||||
var _b, _c, _d, _e, _f;
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
const mergedPRs = [];
|
||||
const options = this.octokit.pulls.list.endpoint.merge({
|
||||
@@ -437,8 +440,8 @@ class PullRequests {
|
||||
direction: 'desc'
|
||||
});
|
||||
try {
|
||||
for (var _f = __asyncValues(this.octokit.paginate.iterator(options)), _g; _g = yield _f.next(), !_g.done;) {
|
||||
const response = _g.value;
|
||||
for (var _g = __asyncValues(this.octokit.paginate.iterator(options)), _h; _h = yield _g.next(), !_h.done;) {
|
||||
const response = _h.value;
|
||||
const prs = response.data;
|
||||
for (const pr of prs.filter(p => !!p.merged_at)) {
|
||||
mergedPRs.push({
|
||||
@@ -446,20 +449,20 @@ class PullRequests {
|
||||
title: pr.title,
|
||||
htmlURL: pr.html_url,
|
||||
mergedAt: moment_1.default(pr.merged_at),
|
||||
mergeCommitSha: pr.merge_commit_sha,
|
||||
author: pr.user.login,
|
||||
mergeCommitSha: pr.merge_commit_sha || "",
|
||||
author: ((_b = pr.user) === null || _b === void 0 ? void 0 : _b.login) || "",
|
||||
repoName: pr.base.repo.full_name,
|
||||
labels: (_b = pr.labels) === null || _b === void 0 ? void 0 : _b.map(function (label) {
|
||||
return label.name;
|
||||
}),
|
||||
milestone: (_c = pr.milestone) === null || _c === void 0 ? void 0 : _c.title,
|
||||
body: pr.body,
|
||||
assignees: (_d = pr.assignees) === null || _d === void 0 ? void 0 : _d.map(function (asignee) {
|
||||
return asignee.login;
|
||||
}),
|
||||
requestedReviewers: (_e = pr.requested_reviewers) === null || _e === void 0 ? void 0 : _e.map(function (reviewer) {
|
||||
return reviewer.login;
|
||||
})
|
||||
labels: ((_c = pr.labels) === null || _c === void 0 ? void 0 : _c.map(function (label) {
|
||||
return label.name || "";
|
||||
})) || [],
|
||||
milestone: ((_d = pr.milestone) === null || _d === void 0 ? void 0 : _d.title) || "",
|
||||
body: pr.body || "",
|
||||
assignees: ((_e = pr.assignees) === null || _e === void 0 ? void 0 : _e.map(function (asignee) {
|
||||
return (asignee === null || asignee === void 0 ? void 0 : asignee.login) || "";
|
||||
})) || [],
|
||||
requestedReviewers: ((_f = pr.requested_reviewers) === null || _f === void 0 ? void 0 : _f.map(function (reviewer) {
|
||||
return (reviewer === null || reviewer === void 0 ? void 0 : reviewer.login) || "";
|
||||
})) || []
|
||||
});
|
||||
}
|
||||
const firstPR = prs[0];
|
||||
@@ -476,7 +479,7 @@ class PullRequests {
|
||||
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
||||
finally {
|
||||
try {
|
||||
if (_g && !_g.done && (_a = _f.return)) yield _a.call(_f);
|
||||
if (_h && !_h.done && (_a = _g.return)) yield _a.call(_g);
|
||||
}
|
||||
finally { if (e_1) throw e_1.error; }
|
||||
}
|
||||
@@ -6056,12 +6059,12 @@ exports.isPlainObject = isPlainObject;
|
||||
|
||||
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
||||
|
||||
var core = __webpack_require__(6762);
|
||||
var core = __webpack_require__(4952);
|
||||
var pluginRequestLog = __webpack_require__(8883);
|
||||
var pluginPaginateRest = __webpack_require__(4193);
|
||||
var pluginPaginateRest = __webpack_require__(606);
|
||||
var pluginRestEndpointMethods = __webpack_require__(4923);
|
||||
|
||||
const VERSION = "18.0.9";
|
||||
const VERSION = "18.0.10";
|
||||
|
||||
const Octokit = core.Octokit.plugin(pluginRequestLog.requestLog, pluginRestEndpointMethods.restEndpointMethods, pluginPaginateRest.paginateRest).defaults({
|
||||
userAgent: `octokit-rest.js/${VERSION}`
|
||||
@@ -6071,6 +6074,328 @@ exports.Octokit = Octokit;
|
||||
//# sourceMappingURL=index.js.map
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ 4952:
|
||||
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
||||
|
||||
"use strict";
|
||||
|
||||
|
||||
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
||||
|
||||
var universalUserAgent = __webpack_require__(5030);
|
||||
var beforeAfterHook = __webpack_require__(3682);
|
||||
var request = __webpack_require__(6234);
|
||||
var graphql = __webpack_require__(8467);
|
||||
var authToken = __webpack_require__(334);
|
||||
|
||||
function _objectWithoutPropertiesLoose(source, excluded) {
|
||||
if (source == null) return {};
|
||||
var target = {};
|
||||
var sourceKeys = Object.keys(source);
|
||||
var key, i;
|
||||
|
||||
for (i = 0; i < sourceKeys.length; i++) {
|
||||
key = sourceKeys[i];
|
||||
if (excluded.indexOf(key) >= 0) continue;
|
||||
target[key] = source[key];
|
||||
}
|
||||
|
||||
return target;
|
||||
}
|
||||
|
||||
function _objectWithoutProperties(source, excluded) {
|
||||
if (source == null) return {};
|
||||
|
||||
var target = _objectWithoutPropertiesLoose(source, excluded);
|
||||
|
||||
var key, i;
|
||||
|
||||
if (Object.getOwnPropertySymbols) {
|
||||
var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
|
||||
|
||||
for (i = 0; i < sourceSymbolKeys.length; i++) {
|
||||
key = sourceSymbolKeys[i];
|
||||
if (excluded.indexOf(key) >= 0) continue;
|
||||
if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
|
||||
target[key] = source[key];
|
||||
}
|
||||
}
|
||||
|
||||
return target;
|
||||
}
|
||||
|
||||
const VERSION = "3.2.2";
|
||||
|
||||
class Octokit {
|
||||
constructor(options = {}) {
|
||||
const hook = new beforeAfterHook.Collection();
|
||||
const requestDefaults = {
|
||||
baseUrl: request.request.endpoint.DEFAULTS.baseUrl,
|
||||
headers: {},
|
||||
request: Object.assign({}, options.request, {
|
||||
hook: hook.bind(null, "request")
|
||||
}),
|
||||
mediaType: {
|
||||
previews: [],
|
||||
format: ""
|
||||
}
|
||||
}; // prepend default user agent with `options.userAgent` if set
|
||||
|
||||
requestDefaults.headers["user-agent"] = [options.userAgent, `octokit-core.js/${VERSION} ${universalUserAgent.getUserAgent()}`].filter(Boolean).join(" ");
|
||||
|
||||
if (options.baseUrl) {
|
||||
requestDefaults.baseUrl = options.baseUrl;
|
||||
}
|
||||
|
||||
if (options.previews) {
|
||||
requestDefaults.mediaType.previews = options.previews;
|
||||
}
|
||||
|
||||
if (options.timeZone) {
|
||||
requestDefaults.headers["time-zone"] = options.timeZone;
|
||||
}
|
||||
|
||||
this.request = request.request.defaults(requestDefaults);
|
||||
this.graphql = graphql.withCustomRequest(this.request).defaults(requestDefaults);
|
||||
this.log = Object.assign({
|
||||
debug: () => {},
|
||||
info: () => {},
|
||||
warn: console.warn.bind(console),
|
||||
error: console.error.bind(console)
|
||||
}, options.log);
|
||||
this.hook = hook; // (1) If neither `options.authStrategy` nor `options.auth` are set, the `octokit` instance
|
||||
// is unauthenticated. The `this.auth()` method is a no-op and no request hook is registered.
|
||||
// (2) If only `options.auth` is set, use the default token authentication strategy.
|
||||
// (3) If `options.authStrategy` is set then use it and pass in `options.auth`. Always pass own request as many strategies accept a custom request instance.
|
||||
// TODO: type `options.auth` based on `options.authStrategy`.
|
||||
|
||||
if (!options.authStrategy) {
|
||||
if (!options.auth) {
|
||||
// (1)
|
||||
this.auth = async () => ({
|
||||
type: "unauthenticated"
|
||||
});
|
||||
} else {
|
||||
// (2)
|
||||
const auth = authToken.createTokenAuth(options.auth); // @ts-ignore ¯\_(ツ)_/¯
|
||||
|
||||
hook.wrap("request", auth.hook);
|
||||
this.auth = auth;
|
||||
}
|
||||
} else {
|
||||
const {
|
||||
authStrategy
|
||||
} = options,
|
||||
otherOptions = _objectWithoutProperties(options, ["authStrategy"]);
|
||||
|
||||
const auth = authStrategy(Object.assign({
|
||||
request: this.request,
|
||||
log: this.log,
|
||||
// we pass the current octokit instance as well as its constructor options
|
||||
// to allow for authentication strategies that return a new octokit instance
|
||||
// that shares the same internal state as the current one. The original
|
||||
// requirement for this was the "event-octokit" authentication strategy
|
||||
// of https://github.com/probot/octokit-auth-probot.
|
||||
octokit: this,
|
||||
octokitOptions: otherOptions
|
||||
}, options.auth)); // @ts-ignore ¯\_(ツ)_/¯
|
||||
|
||||
hook.wrap("request", auth.hook);
|
||||
this.auth = auth;
|
||||
} // apply plugins
|
||||
// https://stackoverflow.com/a/16345172
|
||||
|
||||
|
||||
const classConstructor = this.constructor;
|
||||
classConstructor.plugins.forEach(plugin => {
|
||||
Object.assign(this, plugin(this, options));
|
||||
});
|
||||
}
|
||||
|
||||
static defaults(defaults) {
|
||||
const OctokitWithDefaults = class extends this {
|
||||
constructor(...args) {
|
||||
const options = args[0] || {};
|
||||
|
||||
if (typeof defaults === "function") {
|
||||
super(defaults(options));
|
||||
return;
|
||||
}
|
||||
|
||||
super(Object.assign({}, defaults, options, options.userAgent && defaults.userAgent ? {
|
||||
userAgent: `${options.userAgent} ${defaults.userAgent}`
|
||||
} : null));
|
||||
}
|
||||
|
||||
};
|
||||
return OctokitWithDefaults;
|
||||
}
|
||||
/**
|
||||
* Attach a plugin (or many) to your Octokit instance.
|
||||
*
|
||||
* @example
|
||||
* const API = Octokit.plugin(plugin1, plugin2, plugin3, ...)
|
||||
*/
|
||||
|
||||
|
||||
static plugin(...newPlugins) {
|
||||
var _a;
|
||||
|
||||
const currentPlugins = this.plugins;
|
||||
const NewOctokit = (_a = class extends this {}, _a.plugins = currentPlugins.concat(newPlugins.filter(plugin => !currentPlugins.includes(plugin))), _a);
|
||||
return NewOctokit;
|
||||
}
|
||||
|
||||
}
|
||||
Octokit.VERSION = VERSION;
|
||||
Octokit.plugins = [];
|
||||
|
||||
exports.Octokit = Octokit;
|
||||
//# sourceMappingURL=index.js.map
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ 606:
|
||||
/***/ ((__unused_webpack_module, exports) => {
|
||||
|
||||
"use strict";
|
||||
|
||||
|
||||
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
||||
|
||||
const VERSION = "2.6.1";
|
||||
|
||||
/**
|
||||
* Some “list” response that can be paginated have a different response structure
|
||||
*
|
||||
* They have a `total_count` key in the response (search also has `incomplete_results`,
|
||||
* /installation/repositories also has `repository_selection`), as well as a key with
|
||||
* the list of the items which name varies from endpoint to endpoint.
|
||||
*
|
||||
* Octokit normalizes these responses so that paginated results are always returned following
|
||||
* the same structure. One challenge is that if the list response has only one page, no Link
|
||||
* header is provided, so this header alone is not sufficient to check wether a response is
|
||||
* paginated or not.
|
||||
*
|
||||
* We check if a "total_count" key is present in the response data, but also make sure that
|
||||
* a "url" property is not, as the "Get the combined status for a specific ref" endpoint would
|
||||
* otherwise match: https://developer.github.com/v3/repos/statuses/#get-the-combined-status-for-a-specific-ref
|
||||
*/
|
||||
function normalizePaginatedListResponse(response) {
|
||||
const responseNeedsNormalization = "total_count" in response.data && !("url" in response.data);
|
||||
if (!responseNeedsNormalization) return response; // keep the additional properties intact as there is currently no other way
|
||||
// to retrieve the same information.
|
||||
|
||||
const incompleteResults = response.data.incomplete_results;
|
||||
const repositorySelection = response.data.repository_selection;
|
||||
const totalCount = response.data.total_count;
|
||||
delete response.data.incomplete_results;
|
||||
delete response.data.repository_selection;
|
||||
delete response.data.total_count;
|
||||
const namespaceKey = Object.keys(response.data)[0];
|
||||
const data = response.data[namespaceKey];
|
||||
response.data = data;
|
||||
|
||||
if (typeof incompleteResults !== "undefined") {
|
||||
response.data.incomplete_results = incompleteResults;
|
||||
}
|
||||
|
||||
if (typeof repositorySelection !== "undefined") {
|
||||
response.data.repository_selection = repositorySelection;
|
||||
}
|
||||
|
||||
response.data.total_count = totalCount;
|
||||
return response;
|
||||
}
|
||||
|
||||
function iterator(octokit, route, parameters) {
|
||||
const options = typeof route === "function" ? route.endpoint(parameters) : octokit.request.endpoint(route, parameters);
|
||||
const requestMethod = typeof route === "function" ? route : octokit.request;
|
||||
const method = options.method;
|
||||
const headers = options.headers;
|
||||
let url = options.url;
|
||||
return {
|
||||
[Symbol.asyncIterator]: () => ({
|
||||
async next() {
|
||||
if (!url) return {
|
||||
done: true
|
||||
};
|
||||
const response = await requestMethod({
|
||||
method,
|
||||
url,
|
||||
headers
|
||||
});
|
||||
const normalizedResponse = normalizePaginatedListResponse(response); // `response.headers.link` format:
|
||||
// '<https://api.github.com/users/aseemk/followers?page=2>; rel="next", <https://api.github.com/users/aseemk/followers?page=2>; rel="last"'
|
||||
// sets `url` to undefined if "next" URL is not present or `link` header is not set
|
||||
|
||||
url = ((normalizedResponse.headers.link || "").match(/<([^>]+)>;\s*rel="next"/) || [])[1];
|
||||
return {
|
||||
value: normalizedResponse
|
||||
};
|
||||
}
|
||||
|
||||
})
|
||||
};
|
||||
}
|
||||
|
||||
function paginate(octokit, route, parameters, mapFn) {
|
||||
if (typeof parameters === "function") {
|
||||
mapFn = parameters;
|
||||
parameters = undefined;
|
||||
}
|
||||
|
||||
return gather(octokit, [], iterator(octokit, route, parameters)[Symbol.asyncIterator](), mapFn);
|
||||
}
|
||||
|
||||
function gather(octokit, results, iterator, mapFn) {
|
||||
return iterator.next().then(result => {
|
||||
if (result.done) {
|
||||
return results;
|
||||
}
|
||||
|
||||
let earlyExit = false;
|
||||
|
||||
function done() {
|
||||
earlyExit = true;
|
||||
}
|
||||
|
||||
results = results.concat(mapFn ? mapFn(result.value, done) : result.value.data);
|
||||
|
||||
if (earlyExit) {
|
||||
return results;
|
||||
}
|
||||
|
||||
return gather(octokit, results, iterator, mapFn);
|
||||
});
|
||||
}
|
||||
|
||||
const composePaginateRest = Object.assign(paginate, {
|
||||
iterator
|
||||
});
|
||||
|
||||
/**
|
||||
* @param octokit Octokit instance
|
||||
* @param options Options passed to Octokit constructor
|
||||
*/
|
||||
|
||||
function paginateRest(octokit) {
|
||||
return {
|
||||
paginate: Object.assign(paginate.bind(null, octokit), {
|
||||
iterator: iterator.bind(null, octokit)
|
||||
})
|
||||
};
|
||||
}
|
||||
paginateRest.VERSION = VERSION;
|
||||
|
||||
exports.composePaginateRest = composePaginateRest;
|
||||
exports.paginateRest = paginateRest;
|
||||
//# sourceMappingURL=index.js.map
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ 4923:
|
||||
@@ -6099,13 +6424,24 @@ const Endpoints = {
|
||||
deleteSelfHostedRunnerFromRepo: ["DELETE /repos/{owner}/{repo}/actions/runners/{runner_id}"],
|
||||
deleteWorkflowRun: ["DELETE /repos/{owner}/{repo}/actions/runs/{run_id}"],
|
||||
deleteWorkflowRunLogs: ["DELETE /repos/{owner}/{repo}/actions/runs/{run_id}/logs"],
|
||||
disableSelectedRepositoryGithubActionsOrganization: ["DELETE /orgs/{org}/actions/permissions/repositories/{repository_id}"],
|
||||
disableWorkflow: ["PUT /repos/{owner}/{repo}/actions/workflows/{workflow_id}/disable"],
|
||||
downloadArtifact: ["GET /repos/{owner}/{repo}/actions/artifacts/{artifact_id}/{archive_format}"],
|
||||
downloadJobLogsForWorkflowRun: ["GET /repos/{owner}/{repo}/actions/jobs/{job_id}/logs"],
|
||||
downloadWorkflowRunLogs: ["GET /repos/{owner}/{repo}/actions/runs/{run_id}/logs"],
|
||||
enableSelectedRepositoryGithubActionsOrganization: ["PUT /orgs/{org}/actions/permissions/repositories/{repository_id}"],
|
||||
enableWorkflow: ["PUT /repos/{owner}/{repo}/actions/workflows/{workflow_id}/enable"],
|
||||
getAllowedActionsOrganization: ["GET /orgs/{org}/actions/permissions/selected-actions"],
|
||||
getAllowedActionsRepository: ["GET /repos/{owner}/{repo}/actions/permissions/selected-actions"],
|
||||
getArtifact: ["GET /repos/{owner}/{repo}/actions/artifacts/{artifact_id}"],
|
||||
getGithubActionsPermissionsOrganization: ["GET /orgs/{org}/actions/permissions"],
|
||||
getGithubActionsPermissionsRepository: ["GET /repos/{owner}/{repo}/actions/permissions"],
|
||||
getJobForWorkflowRun: ["GET /repos/{owner}/{repo}/actions/jobs/{job_id}"],
|
||||
getOrgPublicKey: ["GET /orgs/{org}/actions/secrets/public-key"],
|
||||
getOrgSecret: ["GET /orgs/{org}/actions/secrets/{secret_name}"],
|
||||
getRepoPermissions: ["GET /repos/{owner}/{repo}/actions/permissions", {}, {
|
||||
renamed: ["actions", "getGithubActionsPermissionsRepository"]
|
||||
}],
|
||||
getRepoPublicKey: ["GET /repos/{owner}/{repo}/actions/secrets/public-key"],
|
||||
getRepoSecret: ["GET /repos/{owner}/{repo}/actions/secrets/{secret_name}"],
|
||||
getSelfHostedRunnerForOrg: ["GET /orgs/{org}/actions/runners/{runner_id}"],
|
||||
@@ -6122,6 +6458,7 @@ const Endpoints = {
|
||||
listRunnerApplicationsForOrg: ["GET /orgs/{org}/actions/runners/downloads"],
|
||||
listRunnerApplicationsForRepo: ["GET /repos/{owner}/{repo}/actions/runners/downloads"],
|
||||
listSelectedReposForOrgSecret: ["GET /orgs/{org}/actions/secrets/{secret_name}/repositories"],
|
||||
listSelectedRepositoriesEnabledGithubActionsOrganization: ["GET /orgs/{org}/actions/permissions/repositories"],
|
||||
listSelfHostedRunnersForOrg: ["GET /orgs/{org}/actions/runners"],
|
||||
listSelfHostedRunnersForRepo: ["GET /repos/{owner}/{repo}/actions/runners"],
|
||||
listWorkflowRunArtifacts: ["GET /repos/{owner}/{repo}/actions/runs/{run_id}/artifacts"],
|
||||
@@ -6129,7 +6466,12 @@ const Endpoints = {
|
||||
listWorkflowRunsForRepo: ["GET /repos/{owner}/{repo}/actions/runs"],
|
||||
reRunWorkflow: ["POST /repos/{owner}/{repo}/actions/runs/{run_id}/rerun"],
|
||||
removeSelectedRepoFromOrgSecret: ["DELETE /orgs/{org}/actions/secrets/{secret_name}/repositories/{repository_id}"],
|
||||
setSelectedReposForOrgSecret: ["PUT /orgs/{org}/actions/secrets/{secret_name}/repositories"]
|
||||
setAllowedActionsOrganization: ["PUT /orgs/{org}/actions/permissions/selected-actions"],
|
||||
setAllowedActionsRepository: ["PUT /repos/{owner}/{repo}/actions/permissions/selected-actions"],
|
||||
setGithubActionsPermissionsOrganization: ["PUT /orgs/{org}/actions/permissions"],
|
||||
setGithubActionsPermissionsRepository: ["PUT /repos/{owner}/{repo}/actions/permissions"],
|
||||
setSelectedReposForOrgSecret: ["PUT /orgs/{org}/actions/secrets/{secret_name}/repositories"],
|
||||
setSelectedRepositoriesEnabledGithubActionsOrganization: ["PUT /orgs/{org}/actions/permissions/repositories"]
|
||||
},
|
||||
activity: {
|
||||
checkRepoIsStarredByAuthenticatedUser: ["GET /user/starred/{owner}/{repo}"],
|
||||
@@ -6185,6 +6527,7 @@ const Endpoints = {
|
||||
getSubscriptionPlanForAccount: ["GET /marketplace_listing/accounts/{account_id}"],
|
||||
getSubscriptionPlanForAccountStubbed: ["GET /marketplace_listing/stubbed/accounts/{account_id}"],
|
||||
getUserInstallation: ["GET /users/{username}/installation"],
|
||||
getWebhookConfigForApp: ["GET /app/hook/config"],
|
||||
listAccountsForPlan: ["GET /marketplace_listing/plans/{plan_id}/accounts"],
|
||||
listAccountsForPlanStubbed: ["GET /marketplace_listing/stubbed/plans/{plan_id}/accounts"],
|
||||
listInstallationReposForAuthenticatedUser: ["GET /user/installations/{installation_id}/repositories"],
|
||||
@@ -6199,7 +6542,8 @@ const Endpoints = {
|
||||
resetToken: ["PATCH /applications/{client_id}/token"],
|
||||
revokeInstallationAccessToken: ["DELETE /installation/token"],
|
||||
suspendInstallation: ["PUT /app/installations/{installation_id}/suspended"],
|
||||
unsuspendInstallation: ["DELETE /app/installations/{installation_id}/suspended"]
|
||||
unsuspendInstallation: ["DELETE /app/installations/{installation_id}/suspended"],
|
||||
updateWebhookConfigForApp: ["PATCH /app/hook/config"]
|
||||
},
|
||||
billing: {
|
||||
getGithubActionsBillingOrg: ["GET /orgs/{org}/settings/billing/actions"],
|
||||
@@ -6210,61 +6554,17 @@ const Endpoints = {
|
||||
getSharedStorageBillingUser: ["GET /users/{username}/settings/billing/shared-storage"]
|
||||
},
|
||||
checks: {
|
||||
create: ["POST /repos/{owner}/{repo}/check-runs", {
|
||||
mediaType: {
|
||||
previews: ["antiope"]
|
||||
}
|
||||
}],
|
||||
createSuite: ["POST /repos/{owner}/{repo}/check-suites", {
|
||||
mediaType: {
|
||||
previews: ["antiope"]
|
||||
}
|
||||
}],
|
||||
get: ["GET /repos/{owner}/{repo}/check-runs/{check_run_id}", {
|
||||
mediaType: {
|
||||
previews: ["antiope"]
|
||||
}
|
||||
}],
|
||||
getSuite: ["GET /repos/{owner}/{repo}/check-suites/{check_suite_id}", {
|
||||
mediaType: {
|
||||
previews: ["antiope"]
|
||||
}
|
||||
}],
|
||||
listAnnotations: ["GET /repos/{owner}/{repo}/check-runs/{check_run_id}/annotations", {
|
||||
mediaType: {
|
||||
previews: ["antiope"]
|
||||
}
|
||||
}],
|
||||
listForRef: ["GET /repos/{owner}/{repo}/commits/{ref}/check-runs", {
|
||||
mediaType: {
|
||||
previews: ["antiope"]
|
||||
}
|
||||
}],
|
||||
listForSuite: ["GET /repos/{owner}/{repo}/check-suites/{check_suite_id}/check-runs", {
|
||||
mediaType: {
|
||||
previews: ["antiope"]
|
||||
}
|
||||
}],
|
||||
listSuitesForRef: ["GET /repos/{owner}/{repo}/commits/{ref}/check-suites", {
|
||||
mediaType: {
|
||||
previews: ["antiope"]
|
||||
}
|
||||
}],
|
||||
rerequestSuite: ["POST /repos/{owner}/{repo}/check-suites/{check_suite_id}/rerequest", {
|
||||
mediaType: {
|
||||
previews: ["antiope"]
|
||||
}
|
||||
}],
|
||||
setSuitesPreferences: ["PATCH /repos/{owner}/{repo}/check-suites/preferences", {
|
||||
mediaType: {
|
||||
previews: ["antiope"]
|
||||
}
|
||||
}],
|
||||
update: ["PATCH /repos/{owner}/{repo}/check-runs/{check_run_id}", {
|
||||
mediaType: {
|
||||
previews: ["antiope"]
|
||||
}
|
||||
}]
|
||||
create: ["POST /repos/{owner}/{repo}/check-runs"],
|
||||
createSuite: ["POST /repos/{owner}/{repo}/check-suites"],
|
||||
get: ["GET /repos/{owner}/{repo}/check-runs/{check_run_id}"],
|
||||
getSuite: ["GET /repos/{owner}/{repo}/check-suites/{check_suite_id}"],
|
||||
listAnnotations: ["GET /repos/{owner}/{repo}/check-runs/{check_run_id}/annotations"],
|
||||
listForRef: ["GET /repos/{owner}/{repo}/commits/{ref}/check-runs"],
|
||||
listForSuite: ["GET /repos/{owner}/{repo}/check-suites/{check_suite_id}/check-runs"],
|
||||
listSuitesForRef: ["GET /repos/{owner}/{repo}/commits/{ref}/check-suites"],
|
||||
rerequestSuite: ["POST /repos/{owner}/{repo}/check-suites/{check_suite_id}/rerequest"],
|
||||
setSuitesPreferences: ["PATCH /repos/{owner}/{repo}/check-suites/preferences"],
|
||||
update: ["PATCH /repos/{owner}/{repo}/check-runs/{check_run_id}"]
|
||||
},
|
||||
codeScanning: {
|
||||
getAlert: ["GET /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}", {}, {
|
||||
@@ -6297,6 +6597,16 @@ const Endpoints = {
|
||||
emojis: {
|
||||
get: ["GET /emojis"]
|
||||
},
|
||||
enterpriseAdmin: {
|
||||
disableSelectedOrganizationGithubActionsEnterprise: ["DELETE /enterprises/{enterprise}/actions/permissions/organizations/{org_id}"],
|
||||
enableSelectedOrganizationGithubActionsEnterprise: ["PUT /enterprises/{enterprise}/actions/permissions/organizations/{org_id}"],
|
||||
getAllowedActionsEnterprise: ["GET /enterprises/{enterprise}/actions/permissions/selected-actions"],
|
||||
getGithubActionsPermissionsEnterprise: ["GET /enterprises/{enterprise}/actions/permissions"],
|
||||
listSelectedOrganizationsEnabledGithubActionsEnterprise: ["GET /enterprises/{enterprise}/actions/permissions/organizations"],
|
||||
setAllowedActionsEnterprise: ["PUT /enterprises/{enterprise}/actions/permissions/selected-actions"],
|
||||
setGithubActionsPermissionsEnterprise: ["PUT /enterprises/{enterprise}/actions/permissions"],
|
||||
setSelectedOrganizationsEnabledGithubActionsEnterprise: ["PUT /enterprises/{enterprise}/actions/permissions/organizations"]
|
||||
},
|
||||
gists: {
|
||||
checkIsStarred: ["GET /gists/{gist_id}/star"],
|
||||
create: ["POST /gists"],
|
||||
@@ -6339,36 +6649,15 @@ const Endpoints = {
|
||||
getTemplate: ["GET /gitignore/templates/{name}"]
|
||||
},
|
||||
interactions: {
|
||||
getRestrictionsForOrg: ["GET /orgs/{org}/interaction-limits", {
|
||||
mediaType: {
|
||||
previews: ["sombra"]
|
||||
}
|
||||
}],
|
||||
getRestrictionsForRepo: ["GET /repos/{owner}/{repo}/interaction-limits", {
|
||||
mediaType: {
|
||||
previews: ["sombra"]
|
||||
}
|
||||
}],
|
||||
removeRestrictionsForOrg: ["DELETE /orgs/{org}/interaction-limits", {
|
||||
mediaType: {
|
||||
previews: ["sombra"]
|
||||
}
|
||||
}],
|
||||
removeRestrictionsForRepo: ["DELETE /repos/{owner}/{repo}/interaction-limits", {
|
||||
mediaType: {
|
||||
previews: ["sombra"]
|
||||
}
|
||||
}],
|
||||
setRestrictionsForOrg: ["PUT /orgs/{org}/interaction-limits", {
|
||||
mediaType: {
|
||||
previews: ["sombra"]
|
||||
}
|
||||
}],
|
||||
setRestrictionsForRepo: ["PUT /repos/{owner}/{repo}/interaction-limits", {
|
||||
mediaType: {
|
||||
previews: ["sombra"]
|
||||
}
|
||||
}]
|
||||
getRestrictionsForOrg: ["GET /orgs/{org}/interaction-limits"],
|
||||
getRestrictionsForRepo: ["GET /repos/{owner}/{repo}/interaction-limits"],
|
||||
getRestrictionsForYourPublicRepos: ["GET /user/interaction-limits"],
|
||||
removeRestrictionsForOrg: ["DELETE /orgs/{org}/interaction-limits"],
|
||||
removeRestrictionsForRepo: ["DELETE /repos/{owner}/{repo}/interaction-limits"],
|
||||
removeRestrictionsForYourPublicRepos: ["DELETE /user/interaction-limits"],
|
||||
setRestrictionsForOrg: ["PUT /orgs/{org}/interaction-limits"],
|
||||
setRestrictionsForRepo: ["PUT /repos/{owner}/{repo}/interaction-limits"],
|
||||
setRestrictionsForYourPublicRepos: ["PUT /user/interaction-limits"]
|
||||
},
|
||||
issues: {
|
||||
addAssignees: ["POST /repos/{owner}/{repo}/issues/{issue_number}/assignees"],
|
||||
@@ -6429,7 +6718,10 @@ const Endpoints = {
|
||||
}]
|
||||
},
|
||||
meta: {
|
||||
get: ["GET /meta"]
|
||||
get: ["GET /meta"],
|
||||
getOctocat: ["GET /octocat"],
|
||||
getZen: ["GET /zen"],
|
||||
root: ["GET /"]
|
||||
},
|
||||
migrations: {
|
||||
cancelImport: ["DELETE /repos/{owner}/{repo}/import"],
|
||||
@@ -6516,6 +6808,7 @@ const Endpoints = {
|
||||
getMembershipForAuthenticatedUser: ["GET /user/memberships/orgs/{org}"],
|
||||
getMembershipForUser: ["GET /orgs/{org}/memberships/{username}"],
|
||||
getWebhook: ["GET /orgs/{org}/hooks/{hook_id}"],
|
||||
getWebhookConfigForOrg: ["GET /orgs/{org}/hooks/{hook_id}/config"],
|
||||
list: ["GET /organizations"],
|
||||
listAppInstallations: ["GET /orgs/{org}/installations"],
|
||||
listBlockedUsers: ["GET /orgs/{org}/blocks"],
|
||||
@@ -6538,7 +6831,8 @@ const Endpoints = {
|
||||
unblockUser: ["DELETE /orgs/{org}/blocks/{username}"],
|
||||
update: ["PATCH /orgs/{org}"],
|
||||
updateMembershipForAuthenticatedUser: ["PATCH /user/memberships/orgs/{org}"],
|
||||
updateWebhook: ["PATCH /orgs/{org}/hooks/{hook_id}"]
|
||||
updateWebhook: ["PATCH /orgs/{org}/hooks/{hook_id}"],
|
||||
updateWebhookConfigForOrg: ["PATCH /orgs/{org}/hooks/{hook_id}/config"]
|
||||
},
|
||||
projects: {
|
||||
addCollaborator: ["PUT /projects/{project_id}/collaborators/{username}", {
|
||||
@@ -6769,7 +7063,7 @@ const Endpoints = {
|
||||
previews: ["squirrel-girl"]
|
||||
}
|
||||
}, {
|
||||
deprecated: "octokit.reactions.deleteLegacy() is deprecated, see https://developer.github.com/v3/reactions/#delete-a-reaction-legacy"
|
||||
deprecated: "octokit.reactions.deleteLegacy() is deprecated, see https://docs.github.com/v3/reactions/#delete-a-reaction-legacy"
|
||||
}],
|
||||
listForCommitComment: ["GET /repos/{owner}/{repo}/comments/{comment_id}/reactions", {
|
||||
mediaType: {
|
||||
@@ -6885,7 +7179,11 @@ const Endpoints = {
|
||||
previews: ["dorian"]
|
||||
}
|
||||
}],
|
||||
downloadArchive: ["GET /repos/{owner}/{repo}/{archive_format}/{ref}"],
|
||||
downloadArchive: ["GET /repos/{owner}/{repo}/zipball/{ref}", {}, {
|
||||
renamed: ["repos", "downloadZipballArchive"]
|
||||
}],
|
||||
downloadTarballArchive: ["GET /repos/{owner}/{repo}/tarball/{ref}"],
|
||||
downloadZipballArchive: ["GET /repos/{owner}/{repo}/zipball/{ref}"],
|
||||
enableAutomatedSecurityFixes: ["PUT /repos/{owner}/{repo}/automated-security-fixes", {
|
||||
mediaType: {
|
||||
previews: ["london"]
|
||||
@@ -6920,11 +7218,7 @@ const Endpoints = {
|
||||
previews: ["zzzax"]
|
||||
}
|
||||
}],
|
||||
getCommunityProfileMetrics: ["GET /repos/{owner}/{repo}/community/profile", {
|
||||
mediaType: {
|
||||
previews: ["black-panther"]
|
||||
}
|
||||
}],
|
||||
getCommunityProfileMetrics: ["GET /repos/{owner}/{repo}/community/profile"],
|
||||
getContent: ["GET /repos/{owner}/{repo}/contents/{path}"],
|
||||
getContributorsStats: ["GET /repos/{owner}/{repo}/stats/contributors"],
|
||||
getDeployKey: ["GET /repos/{owner}/{repo}/keys/{key_id}"],
|
||||
@@ -6948,6 +7242,7 @@ const Endpoints = {
|
||||
getUsersWithAccessToProtectedBranch: ["GET /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users"],
|
||||
getViews: ["GET /repos/{owner}/{repo}/traffic/views"],
|
||||
getWebhook: ["GET /repos/{owner}/{repo}/hooks/{hook_id}"],
|
||||
getWebhookConfigForRepo: ["GET /repos/{owner}/{repo}/hooks/{hook_id}/config"],
|
||||
listBranches: ["GET /repos/{owner}/{repo}/branches"],
|
||||
listBranchesForHeadCommit: ["GET /repos/{owner}/{repo}/commits/{commit_sha}/branches-where-head", {
|
||||
mediaType: {
|
||||
@@ -7027,8 +7322,12 @@ const Endpoints = {
|
||||
updatePullRequestReviewProtection: ["PATCH /repos/{owner}/{repo}/branches/{branch}/protection/required_pull_request_reviews"],
|
||||
updateRelease: ["PATCH /repos/{owner}/{repo}/releases/{release_id}"],
|
||||
updateReleaseAsset: ["PATCH /repos/{owner}/{repo}/releases/assets/{asset_id}"],
|
||||
updateStatusCheckPotection: ["PATCH /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks"],
|
||||
updateStatusCheckPotection: ["PATCH /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks", {}, {
|
||||
renamed: ["repos", "updateStatusCheckProtection"]
|
||||
}],
|
||||
updateStatusCheckProtection: ["PATCH /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks"],
|
||||
updateWebhook: ["PATCH /repos/{owner}/{repo}/hooks/{hook_id}"],
|
||||
updateWebhookConfigForRepo: ["PATCH /repos/{owner}/{repo}/hooks/{hook_id}/config"],
|
||||
uploadReleaseAsset: ["POST /repos/{owner}/{repo}/releases/{release_id}/assets{?name,label}", {
|
||||
baseUrl: "https://uploads.github.com"
|
||||
}]
|
||||
@@ -7130,7 +7429,7 @@ const Endpoints = {
|
||||
}
|
||||
};
|
||||
|
||||
const VERSION = "4.2.1";
|
||||
const VERSION = "4.3.0";
|
||||
|
||||
function endpointsToMethods(octokit, endpointsMap) {
|
||||
const newMethods = {};
|
||||
|
||||
+1
-1
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user