REST API that retrieves GitHub repositories for a given user, excluding forks and including branch information.
- Java 25
- Gradle
gradlew bootRunGET /api/users/{username}/repos
Success Response (200):
[
{
"repositoryName": "my-repo",
"ownerLogin": "username",
"branches": [
{
"name": "main",
"lastCommitSha": "abc123..."
}
]
}
]Error Response (404):
{
"status": 404,
"message": "User 'username' does not exist"
}gradlew test- Java 25
- Spring Boot 4.0.1
- Gradle with Kotlin DSL
- WireMock for integration testing
- RestClient for HTTP communication
Simple proxy architecture with Controller/Service/Client pattern. All classes in single package as per requirements.