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:
PJ Quirk
2020-05-15 09:52:23 -04:00
committed by GitHub
parent 04aa5dbc72
commit c5c9bd0f54
7791 changed files with 2209804 additions and 49075 deletions

View File

@@ -1,23 +1,20 @@
import deepmerge from "deepmerge";
import isPlainObject from "is-plain-object";
import { lowercaseKeys } from "./util/lowercase-keys";
import { mergeDeep } from "./util/merge-deep";
export function merge(defaults, route, options) {
if (typeof route === "string") {
let [method, url] = route.split(" ");
options = Object.assign(url ? { method, url } : { url: method }, options);
}
else {
options = route || {};
options = Object.assign({}, route);
}
// lowercase header names before merging with defaults to avoid duplicates
options.headers = lowercaseKeys(options.headers);
const mergedOptions = deepmerge.all([defaults, options].filter(Boolean), {
isMergeableObject: isPlainObject
});
const mergedOptions = mergeDeep(defaults || {}, options);
// mediaType.previews arrays are merged, instead of overwritten
if (defaults && defaults.mediaType.previews.length) {
mergedOptions.mediaType.previews = defaults.mediaType.previews
.filter(preview => !mergedOptions.mediaType.previews.includes(preview))
.filter((preview) => !mergedOptions.mediaType.previews.includes(preview))
.concat(mergedOptions.mediaType.previews);
}
mergedOptions.mediaType.previews = mergedOptions.mediaType.previews.map((preview) => preview.replace(/-preview/, ""));