( params: CreateReviewParams )
| 186 | |
| 187 | function createCodeReviewErrorMetadata(params: CreateReviewParams) { |
| 188 | return { |
| 189 | owner: params.owner, |
| 190 | platformIntegrationId: params.platformIntegrationId, |
| 191 | repoFullName: params.repoFullName, |
| 192 | prNumber: params.prNumber, |
| 193 | prUrl: params.prUrl, |
| 194 | headSha: params.headSha, |
| 195 | platform: params.platform, |
| 196 | platformProjectId: params.platformProjectId, |
| 197 | manualConfig: params.manualConfig |
| 198 | ? { |
| 199 | outputMode: params.manualConfig.outputMode, |
| 200 | hasInstructions: params.manualConfig.instructions !== null, |
| 201 | modelSlug: params.manualConfig.agentConfig.model_slug, |
| 202 | thinkingEffort: params.manualConfig.agentConfig.thinking_effort ?? null, |
| 203 | } |
| 204 | : null, |
| 205 | }; |
| 206 | } |
| 207 | |
| 208 | function codeReviewInsertValues( |
| 209 | params: CreateReviewParams |
| 210 | ): typeof cloud_agent_code_reviews.$inferInsert { |
| 211 | return { |
| 212 | owned_by_organization_id: params.owner.type === 'org' ? params.owner.id : null, |
| 213 | owned_by_user_id: params.owner.type === 'user' ? params.owner.id : null, |
no outgoing calls
no test coverage detected