* Validate that a repository exists and is accessible
(owner: string, repo: string)
| 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. |
no test coverage detected