The result will come from GitHub's public API.
- Stars
- —
- Forks
- —
- Open issues
- —
- Updated
- —
@haskou/metrics playground
Enter any public GitHub repository. One decorated method makes the request while the default runtime records its calls, duration, logs, and failures.
The result will come from GitHub's public API.
class GitHubRepositoryFinder {
@Metrics()
public async find(repository: string): Promise<Repository> {
const response = await fetch(githubUrl(repository));
if (!response.ok) {
throw new GitHubRepositoryRequestError(repository, response.status);
}
return response.json();
}
}