We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 64c334f commit 94de2cfCopy full SHA for 94de2cf
1 file changed
packages/github/src/github.ts
@@ -2,7 +2,7 @@ import * as Context from './context'
2
import {GitHub, getOctokitOptions} from './utils'
3
4
// octokit + plugins
5
-import {OctokitOptions} from '@octokit/core/dist-types/types'
+import {OctokitOptions, OctokitPlugin} from '@octokit/core/dist-types/types'
6
7
export const context = new Context.Context()
8
@@ -14,7 +14,9 @@ export const context = new Context.Context()
14
*/
15
export function getOctokit(
16
token: string,
17
- options?: OctokitOptions
+ options?: OctokitOptions,
18
+ ...additionalPlugins: OctokitPlugin[]
19
): InstanceType<typeof GitHub> {
- return new GitHub(getOctokitOptions(token, options))
20
+ const GitHubWithPlugins = GitHub.plugin(...additionalPlugins)
21
+ return new GitHubWithPlugins(getOctokitOptions(token, options))
22
}
0 commit comments