MCPcopy Create free account
hub / github.com/dyoshikawa/rulesync / validateRepository

Method validateRepository

src/lib/github-client.ts:220–230  ·  view source on GitHub ↗

* Validate that a repository exists and is accessible

(owner: string, repo: string)

Source from the content-addressed store, hash-verified

218 * Validate that a repository exists and is accessible
219 */
220 async validateRepository(owner: string, repo: string): Promise<boolean> {
221 try {
222 await this.getRepoInfo(owner, repo);
223 return true;
224 } catch (error) {
225 if (error instanceof GitHubClientError && error.statusCode === 404) {
226 return false;
227 }
228 throw error;
229 }
230 }
231
232 /**
233 * Resolve a ref (branch, tag, or SHA) to a full commit SHA.

Callers 2

fetchFilesFunction · 0.95

Calls 1

getRepoInfoMethod · 0.95

Tested by

no test coverage detected