fix(repository): in case remote repo does not exists on disk, retrieve empty branch array instead of throwing error
+ 3
- 2
app/services/repository/getRepositoryBranches.ts
@@ -29,8 +29,9 @@ const makeGetRepositoryBranches: ServiceMethodFactory<
     }
 
     const repoPath = `${Env.GIT_REPOSITORIES_ROOT}/${parentOrg.slug}/${repo.slug}.git`;
+
     if (existsSync(repoPath) === false) {
-      throw new Error(`Could not find a valid git repository at: ${repoPath}`);
+      return [];
     }
 
     try {

@@ -46,7 +46,7 @@ model OrganizationMembership {
 
 model PullRequest {
   id                 String @id @default(cuid())
-  uid                Int    @default(0)
+  uid                Int    @default(autoincrement())
   authorId           String
   sourceRepositoryId String
   targetRepositoryId String