MCPcopy Create free account
hub / github.com/decaporg/decap-cms / forkExists

Method forkExists

packages/decap-cms-backend-forgejo/src/API.ts:1036–1045  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

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,

Callers 2

authenticateWithForkMethod · 0.45
API.spec.jsFile · 0.45

Calls 2

requestMethod · 0.95
isForkOfOriginMethod · 0.95

Tested by

no test coverage detected