mirror of
https://github.com/diligencia/semantic-branch-version.git
synced 2024-11-24 08:03:51 +08:00
18 lines
520 B
JavaScript
18 lines
520 B
JavaScript
|
import { request } from "@octokit/request";
|
||
|
import { getUserAgent } from "universal-user-agent";
|
||
|
import { VERSION } from "./version";
|
||
|
import { withDefaults } from "./with-defaults";
|
||
|
export const graphql = withDefaults(request, {
|
||
|
headers: {
|
||
|
"user-agent": `octokit-graphql.js/${VERSION} ${getUserAgent()}`,
|
||
|
},
|
||
|
method: "POST",
|
||
|
url: "/graphql",
|
||
|
});
|
||
|
export function withCustomRequest(customRequest) {
|
||
|
return withDefaults(customRequest, {
|
||
|
method: "POST",
|
||
|
url: "/graphql",
|
||
|
});
|
||
|
}
|