mirror of https://github.com/actions/toolkit
Accept Octokit.Options in the GitHub constructor
parent
eb4c32847c
commit
e533651251
|
@ -14,8 +14,8 @@ export class GitHub extends Octokit {
|
||||||
variables?: Variables
|
variables?: Variables
|
||||||
) => Promise<GraphQlQueryResponse>
|
) => Promise<GraphQlQueryResponse>
|
||||||
|
|
||||||
constructor(token: string) {
|
constructor(token: string, opts: Omit<Octokit.Options, 'auth'> = {}) {
|
||||||
super({auth: `token ${token}`})
|
super({...opts, auth: `token ${token}`})
|
||||||
this.graphql = defaults({
|
this.graphql = defaults({
|
||||||
headers: {authorization: `token ${token}`}
|
headers: {authorization: `token ${token}`}
|
||||||
})
|
})
|
||||||
|
|
Loading…
Reference in New Issue