({
owner,
status,
createdAt,
updatedAt = createdAt,
startedAt = null,
completedAt = null,
errorMessage = null,
terminalReason = null,
}: {
owner: ReviewOwner;
status: string;
createdAt: string;
updatedAt?: string;
startedAt?: string | null;
completedAt?: string | null;
errorMessage?: string | null;
terminalReason?: string | null;
})
| 81 | }); |
| 82 | |
| 83 | function reviewValues({ |
| 84 | owner, |
| 85 | status, |
| 86 | createdAt, |
| 87 | updatedAt = createdAt, |
| 88 | startedAt = null, |
| 89 | completedAt = null, |
| 90 | errorMessage = null, |
| 91 | terminalReason = null, |
| 92 | }: { |
| 93 | owner: ReviewOwner; |
| 94 | status: string; |
| 95 | createdAt: string; |
| 96 | updatedAt?: string; |
| 97 | startedAt?: string | null; |
| 98 | completedAt?: string | null; |
| 99 | errorMessage?: string | null; |
| 100 | terminalReason?: string | null; |
| 101 | }): CodeReviewInsert { |
| 102 | const sequence = reviewSequence++; |
| 103 | |
| 104 | return { |
| 105 | owned_by_user_id: owner.type === 'user' ? owner.id : null, |
| 106 | owned_by_organization_id: owner.type === 'org' ? owner.id : null, |
| 107 | repo_full_name: REPO, |
| 108 | pr_number: sequence + 1, |
| 109 | pr_url: `https://github.com/${REPO}/pull/${sequence + 1}`, |
| 110 | pr_title: `Test PR ${sequence + 1}`, |
| 111 | pr_author: 'octocat', |
| 112 | base_ref: 'main', |
| 113 | head_ref: `feature/test-${sequence}`, |
| 114 | head_sha: `sha-${sequence}`, |
| 115 | status, |
| 116 | agent_version: 'v2', |
| 117 | started_at: startedAt, |
| 118 | completed_at: completedAt, |
| 119 | error_message: errorMessage, |
| 120 | terminal_reason: terminalReason, |
| 121 | created_at: createdAt, |
| 122 | updated_at: updatedAt, |
| 123 | }; |
| 124 | } |
| 125 | |
| 126 | async function insertWaitMetricRows() { |
| 127 | const personalOwner = { type: 'user', id: adminUser.id } satisfies ReviewOwner; |
no outgoing calls
no test coverage detected