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

Method getRepoInfo

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

* Get repository information

(owner: string, repo: string)

Source from the content-addressed store, hash-verified

89 * Get repository information
90 */
91 async getRepoInfo(owner: string, repo: string): Promise<GitHubRepoInfo> {
92 try {
93 const { data } = await this.octokit.repos.get({ owner, repo });
94 const parsed = GitHubRepoInfoSchema.safeParse(data);
95 if (!parsed.success) {
96 throw new GitHubClientError(
97 `Invalid repository info response: ${formatError(parsed.error)}`,
98 );
99 }
100 return parsed.data;
101 } catch (error) {
102 throw this.handleError(error);
103 }
104 }
105
106 /**
107 * List contents of a directory in a repository

Callers 2

getDefaultBranchMethod · 0.95
validateRepositoryMethod · 0.95

Calls 2

handleErrorMethod · 0.95
formatErrorFunction · 0.85

Tested by

no test coverage detected