mirror of
https://git.mirrors.martin98.com/https://github.com/actions/toolkit
synced 2026-01-04 05:12:55 +08:00
Accept Octokit.Options in the GitHub constructor
This commit is contained in:
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…
x
Reference in New Issue
Block a user