()
| 1034 | } |
| 1035 | |
| 1036 | async forkExists(): Promise<boolean> { |
| 1037 | try { |
| 1038 | const repoName = this.originRepo.split('/')[1]; |
| 1039 | const userRepoPath = `/repos/${this.repoOwner}/${repoName}`; |
| 1040 | const repo = (await this.request(userRepoPath)) as ForgejoRepository; |
| 1041 | return this.isForkOfOrigin(repo); |
| 1042 | } catch { |
| 1043 | return false; |
| 1044 | } |
| 1045 | } |
| 1046 | |
| 1047 | // A fork can be renamed (or created with a custom name), in which case it |
| 1048 | // won't be found under the origin repo name. Look it up among the user's repos, |
no test coverage detected