(analyticsEnabledAtDispatch: boolean)
| 93 | }); |
| 94 | |
| 95 | async function createRunningReview(analyticsEnabledAtDispatch: boolean) { |
| 96 | const suffix = crypto.randomUUID(); |
| 97 | const reviewId = await createCodeReview({ |
| 98 | owner: { type: 'org', id: organizationId, userId }, |
| 99 | platformIntegrationId: organizationIntegrationId, |
| 100 | repoFullName: `analytics/repo-${suffix}`, |
| 101 | prNumber: 1, |
| 102 | prUrl: `https://github.com/analytics/repo-${suffix}/pull/1`, |
| 103 | prTitle: 'Analytics test', |
| 104 | prAuthor: 'octocat', |
| 105 | prAuthorGithubId: '1234', |
| 106 | baseRef: 'main', |
| 107 | headRef: 'feature', |
| 108 | headSha: suffix, |
| 109 | platform: 'github', |
| 110 | }); |
| 111 | reviewIds.push(reviewId); |
| 112 | const attempt = await createCodeReviewAttempt({ |
| 113 | codeReviewId: reviewId, |
| 114 | status: 'running', |
| 115 | sessionId: `session-${suffix}`, |
| 116 | analyticsEnabledAtDispatch, |
| 117 | }); |
| 118 | await updateCodeReviewStatus(reviewId, 'running', { |
| 119 | sessionId: attempt.session_id ?? undefined, |
| 120 | }); |
| 121 | return { reviewId, attempt }; |
| 122 | } |
| 123 | |
| 124 | it('atomically completes an enrolled review and stores taxonomy-only findings', async () => { |
| 125 | const { reviewId, attempt } = await createRunningReview(true); |
no test coverage detected