| 44 | id: string; |
| 45 | installationId: string; |
| 46 | githubAppType: 'standard' | 'lite'; |
| 47 | hasRepositoryAccess: boolean; |
| 48 | hasWritePermission: boolean; |
| 49 | }[]; |
| 50 | } = {} |
| 51 | ) { |
| 52 | const updates: unknown[] = []; |
| 53 | const auditRows: unknown[] = []; |
| 54 | let selectCount = 0; |
| 55 | const actor = options.actor ?? { |
| 56 | id: 'user-123', |
| 57 | email: 'owner@example.com', |
| 58 | name: 'Owner Example', |
| 59 | isAdmin: false, |
| 60 | }; |
| 61 | function createOperations(targetUpdates: unknown[], targetAuditRows: unknown[]) { |
| 62 | return { |
| 63 | update: () => ({ |
| 64 | set: (values: unknown) => ({ |
| 65 | where: async () => { |
| 66 | targetUpdates.push(values); |
| 67 | }, |
| 68 | }), |
| 69 | }), |
| 70 | insert: () => ({ |
| 71 | values: (values: unknown) => ({ |
| 72 | onConflictDoNothing: () => ({ |