1
0
Fork 0

Accept Octokit.Options in the GitHub constructor

pull/113/head
Jonathan Clem 2019-09-05 09:54:27 -04:00
parent eb4c32847c
commit e533651251
No known key found for this signature in database
GPG Key ID: 2BDAA3B545BBE67C
1 changed files with 2 additions and 2 deletions

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}`}
})