A proxy application that fetches a user's GitHub repositories, filters out forks, and returns branch details (name & SHA).
Written with Java 25 and Spring Boot 4.0
- Java 25
- Spring Boot 4.0
- Spring Web
- RestClient
- WireMock
- JDK 25 installed
- Internet connection for dependencies & GitHub API
-
Clone the repository:
git clone https://github.com/zaliznyimh/atipera-test-backend.git cd github-proxy -
Build and Run using Gradle wrapper:
./gradlew bootRun
Note: The application starts on port
8080by default. You can change it insrc/main/resources/application.yamlfile
Retrieves a list of non-forked repositories with their branches
Request:
GET /api/v1/users/{username}/repositories
Accept: application/jsonResponse 200 (Ok):
[
{
"repositoryName": "atipera-test",
"ownerLogin": "zaliznyimh",
"branches": [
{
"name": "master",
"lastCommitSha": "7fd1a60b01f91b314f59955a4e4d4e80d8edf11d"
}
]
}
]Error Response 404 (NotFound):
{
"status": 404,
"message": "Not found account for user with username: {username}"
}Error Response 403 (Forbidden):
{
"status": 403,
"message": "GitHub API rate limit exceeded. Please try again later"
}Uses WireMock for integration tests that mock GitHub API responses, verifying the full application flow without internal mocks
./gradlew test