Add support to v1 to connect to GHES (#69)

* Bumping actions/github to 2.2.0 for GHES

* Husky commit correct node modules
This commit is contained in:
PJ Quirk
2020-05-15 15:25:57 -04:00
committed by GitHub
parent c201d45ef4
commit 0649bd8119
7893 changed files with 2232817 additions and 49009 deletions

View File

@@ -1,26 +1,29 @@
module.exports = Octokit
module.exports = Octokit;
const { request } = require('@octokit/request')
const Hook = require('before-after-hook')
const { request } = require("@octokit/request");
const Hook = require("before-after-hook");
const parseClientOptions = require('./parse-client-options')
const parseClientOptions = require("./parse-client-options");
function Octokit (plugins, options) {
options = options || {}
const hook = new Hook.Collection()
const log = Object.assign({
debug: () => {},
info: () => {},
warn: console.warn,
error: console.error
}, options && options.log)
function Octokit(plugins, options) {
options = options || {};
const hook = new Hook.Collection();
const log = Object.assign(
{
debug: () => {},
info: () => {},
warn: console.warn,
error: console.error
},
options && options.log
);
const api = {
hook,
log,
request: request.defaults(parseClientOptions(options, log, hook))
}
};
plugins.forEach(pluginFunction => pluginFunction(api, options))
plugins.forEach(pluginFunction => pluginFunction(api, options));
return api
return api;
}