File tree 1 file changed +3
-2
lines changed
1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -10,6 +10,7 @@ import { dangerIDToString } from "../../runner/templates/githubIssueTemplate"
10
10
import { api as fetch } from "../../api/fetch"
11
11
import { RepoMetaData } from "../../dsl/RepoMetaData"
12
12
import { CheckOptions } from "./comms/checks/resultsToCheck"
13
+ import memoize from "lodash.memoize"
13
14
14
15
// The Handle the API specific parts of the github
15
16
@@ -325,13 +326,13 @@ export class GitHubAPI {
325
326
* @returns {Promise<GitHubIssueComment[]> } A promise that resolves to an array of GitHub issue comments.
326
327
*
327
328
*/
328
- getPullRequestComments = async ( ) : Promise < GitHubIssueComment [ ] > => {
329
+ getPullRequestComments = memoize ( async ( ) : Promise < GitHubIssueComment [ ] > => {
329
330
const pr = await this . getPullRequestInfo ( )
330
331
const prNumber = pr . number
331
332
const repo = this . repoMetadata . repoSlug
332
333
const owner = pr . base . repo . owner . login
333
334
return await this . getAllOfResource ( `repos/${ owner } /${ repo } /issues/${ prNumber } /comments` )
334
- }
335
+ } )
335
336
336
337
getPullRequestInlineComments = async (
337
338
dangerID : string
You can’t perform that action at this time.
0 commit comments