MCPcopy Create free account
hub / github.com/angular/dev-infra / assert

Method assert

ng-dev/pr/common/validation/assert-enforce-tested.ts:27–46  ·  view source on GitHub ↗
(pullRequest: PullRequestFromGithub, gitClient: AuthenticatedGitClient)

Source from the content-addressed store, hash-verified

25 () => Validation,
26);
27
28class 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 }

Callers

nothing calls this directly

Calls 4

pullRequestRequiresTGPFunction · 0.85
createMethod · 0.45

Tested by

no test coverage detected