diff --git a/package-lock.json b/package-lock.json index 7f0a7267..e1b08290 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9530,9 +9530,9 @@ "dev": true }, "typescript": { - "version": "3.4.4", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-3.4.4.tgz", - "integrity": "sha512-xt5RsIRCEaf6+j9AyOBgvVuAec0i92rgCaS3S+UVf5Z/vF2Hvtsw08wtUTJqp4djwznoAgjSxeCcU4r+CcDBJA==", + "version": "3.6.2", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-3.6.2.tgz", + "integrity": "sha512-lmQ4L+J6mnu3xweP8+rOrUwzmN+MRAj7TgtJtDaXE5PMyX2kCrklhg3rvOsOIfNeAWMQWO2F1GPc1kMD2vLAfw==", "dev": true }, "uglify-js": { diff --git a/package.json b/package.json index 91269bbc..5bdc8697 100644 --- a/package.json +++ b/package.json @@ -26,6 +26,6 @@ "lerna": "^3.13.3", "prettier": "^1.17.0", "ts-jest": "^24.0.2", - "typescript": "^3.4.4" + "typescript": "^3.6.2" } } diff --git a/packages/github/README.md b/packages/github/README.md index 2b74bb1d..b4312568 100644 --- a/packages/github/README.md +++ b/packages/github/README.md @@ -27,6 +27,8 @@ const { data: pullRequest } = await octokit.pulls.get({ console.log(pullRequest); ``` +You can pass client options (except `auth`, which is handled by the token argument), as specified by [Octokit](https://octokit.github.io/rest.js/), as a second argument to the `GitHub` constructor. + You can also make GraphQL requests. See https://github.com/octokit/graphql.js for the API. ```js diff --git a/packages/github/src/github.ts b/packages/github/src/github.ts index 5c85e406..35b5f624 100644 --- a/packages/github/src/github.ts +++ b/packages/github/src/github.ts @@ -14,8 +14,8 @@ export class GitHub extends Octokit { variables?: Variables ) => Promise - constructor(token: string) { - super({auth: `token ${token}`}) + constructor(token: string, opts: Omit = {}) { + super({...opts, auth: `token ${token}`}) this.graphql = defaults({ headers: {authorization: `token ${token}`} })