(pullRequest: PullRequestFromGithub, gitClient: AuthenticatedGitClient)
| 25 | () => Validation, |
| 26 | ); |
| 27 | |
| 28 | class Validation extends PullRequestValidation { |
| 29 | async assert( |
| 30 | pullRequest: PullRequestFromGithub, |
| 31 | gitClient: AuthenticatedGitClient, |
| 32 | config?: NgDevConfig, |
| 33 | ) { |
| 34 | if (!(await pullRequestRequiresTGP(pullRequest, gitClient, config))) { |
| 35 | return; |
| 36 | } |
| 37 | |
| 38 | const comments = await PullRequestComments.create( |
| 39 | gitClient, |
| 40 | pullRequest.number, |
| 41 | ).loadPullRequestComments(); |
| 42 | |
| 43 | const latestCommit = pullRequest.commits.nodes[pullRequest.commits.nodes.length - 1]?.commit; |
| 44 | const latestCommitDate = |
| 45 | latestCommit?.pushedDate ?? latestCommit?.committedDate ?? latestCommit?.authoredDate; |
| 46 | |
| 47 | if (await pullRequestHasValidTestedComment(comments, gitClient, latestCommitDate)) { |
| 48 | return; |
| 49 | } |
nothing calls this directly
no test coverage detected