mirror of
https://github.com/JamesIves/github-pages-deploy-action.git
synced 2023-12-15 20:03:39 +08:00
19 lines
539 B
JavaScript
19 lines
539 B
JavaScript
|
import ENDPOINTS from "./generated/endpoints";
|
||
|
import { VERSION } from "./version";
|
||
|
import { endpointsToMethods } from "./endpoints-to-methods";
|
||
|
export function restEndpointMethods(octokit) {
|
||
|
const api = endpointsToMethods(octokit, ENDPOINTS);
|
||
|
return {
|
||
|
rest: api,
|
||
|
};
|
||
|
}
|
||
|
restEndpointMethods.VERSION = VERSION;
|
||
|
export function legacyRestEndpointMethods(octokit) {
|
||
|
const api = endpointsToMethods(octokit, ENDPOINTS);
|
||
|
return {
|
||
|
...api,
|
||
|
rest: api,
|
||
|
};
|
||
|
}
|
||
|
legacyRestEndpointMethods.VERSION = VERSION;
|