mirror of
https://github.com/actions/labeler.git
synced 2025-12-16 23:23:03 +00:00
Bump actions/github to 2.2.0 to support GHES (#72)
* Bumping actions/github to 2.2.0 * Husky commit correct node modules
This commit is contained in:
38
node_modules/@octokit/plugin-rest-endpoint-methods/dist-src/index.js
generated
vendored
Normal file
38
node_modules/@octokit/plugin-rest-endpoint-methods/dist-src/index.js
generated
vendored
Normal file
@@ -0,0 +1,38 @@
|
||||
import { Deprecation } from "deprecation";
|
||||
import endpointsByScope from "./generated/endpoints";
|
||||
import { VERSION } from "./version";
|
||||
import { registerEndpoints } from "./register-endpoints";
|
||||
/**
|
||||
* This plugin is a 1:1 copy of internal @octokit/rest plugins. The primary
|
||||
* goal is to rebuild @octokit/rest on top of @octokit/core. Once that is
|
||||
* done, we will remove the registerEndpoints methods and return the methods
|
||||
* directly as with the other plugins. At that point we will also remove the
|
||||
* legacy workarounds and deprecations.
|
||||
*
|
||||
* See the plan at
|
||||
* https://github.com/octokit/plugin-rest-endpoint-methods.js/pull/1
|
||||
*/
|
||||
export function restEndpointMethods(octokit) {
|
||||
// @ts-ignore
|
||||
octokit.registerEndpoints = registerEndpoints.bind(null, octokit);
|
||||
registerEndpoints(octokit, endpointsByScope);
|
||||
// Aliasing scopes for backward compatibility
|
||||
// See https://github.com/octokit/rest.js/pull/1134
|
||||
[
|
||||
["gitdata", "git"],
|
||||
["authorization", "oauthAuthorizations"],
|
||||
["pullRequests", "pulls"]
|
||||
].forEach(([deprecatedScope, scope]) => {
|
||||
Object.defineProperty(octokit, deprecatedScope, {
|
||||
get() {
|
||||
octokit.log.warn(
|
||||
// @ts-ignore
|
||||
new Deprecation(`[@octokit/plugin-rest-endpoint-methods] "octokit.${deprecatedScope}.*" methods are deprecated, use "octokit.${scope}.*" instead`));
|
||||
// @ts-ignore
|
||||
return octokit[scope];
|
||||
}
|
||||
});
|
||||
});
|
||||
return {};
|
||||
}
|
||||
restEndpointMethods.VERSION = VERSION;
|
||||
Reference in New Issue
Block a user