An API that will analyze a GitHub user's profile and return useful engineering insights.
Create a .env file:
GITHUB_TOKEN=your_github_token_here
Start the server:
go run ./serverThen open:
http://localhost:8080/hello
Fetch a GitHub profile:
http://localhost:8080/profile/octocat
The response includes the user's profile and up to 100 recently updated public repositories.
The response also includes analysis scores for documentation, repository quality, activity, an overall score, and recommendations.
Errors are returned as JSON:
{
"error": "github user not found"
}The API handler is tested with a fake GitHub client, so tests do not call the real GitHub API.
The GitHub client is tested with a fake HTTP transport, so outbound API behavior is covered without external network calls.