mirror of
https://github.com/github/codeql-action.git
synced 2025-12-27 01:30:10 +08:00
I explicitly had to downgrade "@octokit/plugin-retry" to "^6.0.0". Other dependencies were upgraded.
16 lines
435 B
JavaScript
16 lines
435 B
JavaScript
import { request as Request } from "@octokit/request";
|
|
import { graphql } from "./graphql";
|
|
function withDefaults(request, newDefaults) {
|
|
const newRequest = request.defaults(newDefaults);
|
|
const newApi = (query, options) => {
|
|
return graphql(newRequest, query, options);
|
|
};
|
|
return Object.assign(newApi, {
|
|
defaults: withDefaults.bind(null, newRequest),
|
|
endpoint: newRequest.endpoint
|
|
});
|
|
}
|
|
export {
|
|
withDefaults
|
|
};
|