Accept Octokit.Options in the GitHub constructor

This commit is contained in:
Jonathan Clem committed 2019-09-05 09:54:27 -04:00
1 parent 3c97262d4c
commit 54c1328419
1 file changed
+2 -2
+2 -2
View File
@@ -14,8 +14,8 @@ export class GitHub extends Octokit {
variables?: Variables
) => Promise<GraphQlQueryResponse>
constructor(token: string) {
super({auth: `token ${token}`})
constructor(token: string, opts: Omit<Octokit.Options, 'auth'> = {}) {
super({...opts, auth: `token ${token}`})
this.graphql = defaults({
headers: {authorization: `token ${token}`}
})