(
key: IntegrationTaskKey,
callback: (client: Octokit, task: IOTask, io: IO) => Promise<TResult>,
options?: RunTaskOptions,
errorCallback?: RunTaskErrorCallback
)
| 130 | } |
| 131 | |
| 132 | runTask<T, TResult extends Json<T> | void>( |
| 133 | key: IntegrationTaskKey, |
| 134 | callback: (client: Octokit, task: IOTask, io: IO) => Promise<TResult>, |
| 135 | options?: RunTaskOptions, |
| 136 | errorCallback?: RunTaskErrorCallback |
| 137 | ): Promise<TResult> { |
| 138 | if (!this._io) throw new Error("No IO"); |
| 139 | if (!this._connectionKey) throw new Error("No connection key"); |
| 140 | |
| 141 | return this._io.runTask( |
| 142 | key, |
| 143 | (task, io) => { |
| 144 | if (!this._client) throw new Error("No client"); |
| 145 | return callback(this._client, task, io); |
| 146 | }, |
| 147 | { |
| 148 | icon: "github", |
| 149 | retry: retry.standardBackoff, |
| 150 | ...(options ?? {}), |
| 151 | connectionKey: this._connectionKey, |
| 152 | }, |
| 153 | errorCallback |
| 154 | ); |
| 155 | } |
| 156 | |
| 157 | get issues() { |
| 158 | return new Issues(this.runTask.bind(this)); |
no outgoing calls
no test coverage detected