{"id":23137695,"url":"https://github.com/p4zd4n/atipera","last_synced_at":"2026-05-04T12:39:04.590Z","repository":{"id":249151045,"uuid":"829656203","full_name":"P4ZD4N/atipera","owner":"P4ZD4N","description":"Recruitment task from Atipera. It is API, which allows you to retrieve information about non-fork GitHub repositories","archived":false,"fork":false,"pushed_at":"2024-07-22T17:29:44.000Z","size":45,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-02T02:50:30.562Z","etag":null,"topics":["java","junit","lombok","maven","mockito","recruitment-task","rest-api","spring-boot"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/P4ZD4N.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-07-16T21:51:00.000Z","updated_at":"2024-09-05T05:49:34.000Z","dependencies_parsed_at":"2025-04-04T09:43:00.361Z","dependency_job_id":"95b893d4-b9f4-43dd-92d0-ec7a2ab3310d","html_url":"https://github.com/P4ZD4N/atipera","commit_stats":null,"previous_names":["p4zd4n/atipera"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/P4ZD4N/atipera","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/P4ZD4N%2Fatipera","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/P4ZD4N%2Fatipera/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/P4ZD4N%2Fatipera/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/P4ZD4N%2Fatipera/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/P4ZD4N","download_url":"https://codeload.github.com/P4ZD4N/atipera/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/P4ZD4N%2Fatipera/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32608185,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-04T10:08:07.713Z","status":"ssl_error","status_checked_at":"2026-05-04T10:08:02.005Z","response_time":58,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["java","junit","lombok","maven","mockito","recruitment-task","rest-api","spring-boot"],"created_at":"2024-12-17T13:08:40.681Z","updated_at":"2026-05-04T12:39:04.557Z","avatar_url":"https://github.com/P4ZD4N.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# GitHub Repository API (Atipera Recruitment Task)\n\nSimple API, which allows you to retrieve information about non-fork GitHub repositories of entered user, including their names, owners, branches, and last commit SHAs.\n\n## Table of Contents\n\n- [Tech stack](#tech-stack)\n- [Features](#features)\n- [Requirements](#requirements)\n- [Run](#run)\n- [Usage](#usage)\n- [Errors](#errors)\n- [Running tests](#running-tests)\n\n## Tech Stack\n\n- Java 21\n- Spring Boot 3\n- Maven\n- Lombok\n- JUnit 5\n- Mockito\n\n## Features\n\n- **Retrieving GitHub Repositories:** Provides a list of non-fork repositories for a given GitHub username and details for each, including repository name, owner login, branch names and last commit SHAs.\n- **Handling Non-Existing GitHub User:** Returns a 404 error with a message if the specified GitHub user does not exist.\n- **Handling User with No Repositories:** Returns a 404 error with a message if the specified GitHub user has no repositories.\n- **Handling Unsupported Media Type:** Returns a 415 error with a message if the Accept header is set to a media type other than application/json.\n- **Logging Different Cases:** Logs various scenarios with loggers.\n- **Testing**: Uses JUnit, Mockito, and MockMvc for unit tests, mocking dependencies, and testing REST endpoints.\n\n## Requirements\n\n- Java 21 (or higher)\n- GitHub personal access token (optional for higher rate limits)\n\n## Run\n\nClone the project\n\n```bash\ngit clone https://github.com/P4ZD4N/atipera.git\n```\n\nNavigate the project directory\n\n```bash\ncd /path/to/atipera\n```\n\n**Optional:** Configure GitHub Authentication Token. If you want to avoid usage limits of the GitHub REST API, you need to have a token. \u003ca href=\"https://github.com/settings/tokens\"\u003eGenerate token here\u003c/a\u003e. Then fill **github.auth.token** property with your token in **application.properties** file like below:\n\n```bash\ngithub.auth.token=YOUR_GITHUB_PERSONAL_ACCESS_TOKEN\n```\n\nRun the Application\n\n```bash\n./mvnw spring-boot:run\n```\n\nIf Maven is installed globally:\n\n```bash\nmvn spring-boot:run\n```\n\n## Usage\n\n#### Base URL\n\nThe base URL for the API is:\n\n```bash\nhttp://localhost:8080\n```\n\n#### Endpoint\n\nList GitHub repositories for desired user:\n\n```bash\nGET /api/github/repositories/{username}\nAccept: application/json\n```\n\nWhere `{username}` is username of GitHub user, which repositories you want to retrieve. \n\n#### Example\n\n```bash\nGET /api/github/repositories/p4zd4n\nAccept: application/json\n```\n\n```\n[\n    {\n        \"repo_name\": \"3-column-preview-card\",\n        \"owner_login\": \"P4ZD4N\",\n        \"branches\": [\n            {\n                \"name\": \"main\",\n                \"last_commit\": {\n                    \"sha\": \"e973ab1d4c0308c0483b121bb72ca3d075e5ec3d\"\n                }\n            }\n        ]\n    },\n    {\n        \"repo_name\": \"area-intruders\",\n        \"owner_login\": \"P4ZD4N\",\n        \"branches\": [\n            {\n                \"name\": \"main\",\n                \"last_commit\": {\n                    \"sha\": \"aa5da17cb9b857fb06c1d2f5690b004cdb3c5027\"\n                }\n            }\n        ]\n    },\n    {\n        \"repo_name\": \"atipera\",\n        \"owner_login\": \"P4ZD4N\",\n        \"branches\": [\n            {\n                \"name\": \"main\",\n                \"last_commit\": {\n                    \"sha\": \"663245ad93b15c6eba605c2fdfc5b467ea80a409\"\n                }\n            }\n        ]\n    },\n    {\n        \"repo_name\": \"bibliotheca-chudyana\",\n        \"owner_login\": \"P4ZD4N\",\n        \"branches\": [\n            {\n                \"name\": \"dev\",\n                \"last_commit\": {\n                    \"sha\": \"a2d11429a2b6fdb02706f151de1760a8ba6904a6\"\n                }\n            },\n            {\n                \"name\": \"main\",\n                \"last_commit\": {\n                    \"sha\": \"a2d11429a2b6fdb02706f151de1760a8ba6904a6\"\n                }\n            }\n        ]\n    },\n    {\n        \"repo_name\": \"codewars\",\n        \"owner_login\": \"P4ZD4N\",\n        \"branches\": [\n            {\n                \"name\": \"master\",\n                \"last_commit\": {\n                    \"sha\": \"6adc6dcd161fc308718703add0732a7bed516ea5\"\n                }\n            }\n        ]\n    },\n    {\n        \"repo_name\": \"four-card-feature-section\",\n        \"owner_login\": \"P4ZD4N\",\n        \"branches\": [\n            {\n                \"name\": \"main\",\n                \"last_commit\": {\n                    \"sha\": \"9e70d22895f7d23217dde78a6370f7f220d64f9f\"\n                }\n            }\n        ]\n    },\n    {\n        \"repo_name\": \"globogym\",\n        \"owner_login\": \"P4ZD4N\",\n        \"branches\": [\n            {\n                \"name\": \"main\",\n                \"last_commit\": {\n                    \"sha\": \"f5317ba1b42f23ec59fb59d0e29bf86350561e83\"\n                }\n            }\n        ]\n    },\n    {\n        \"repo_name\": \"huddle-landing-page-with-a-single-introductory-section\",\n        \"owner_login\": \"P4ZD4N\",\n        \"branches\": [\n            {\n                \"name\": \"main\",\n                \"last_commit\": {\n                    \"sha\": \"585eeda1d58b34fbc0b0c0ac7931c01a7e829772\"\n                }\n            }\n        ]\n    },\n    {\n        \"repo_name\": \"leetcode\",\n        \"owner_login\": \"P4ZD4N\",\n        \"branches\": [\n            {\n                \"name\": \"main\",\n                \"last_commit\": {\n                    \"sha\": \"445a91f179a857a9e20e6097321a3c17088fd6ab\"\n                }\n            }\n        ]\n    },\n    {\n        \"repo_name\": \"p4zd4n\",\n        \"owner_login\": \"P4ZD4N\",\n        \"branches\": [\n            {\n                \"name\": \"main\",\n                \"last_commit\": {\n                    \"sha\": \"19fc089da88cec5ccb0871df5d4a33a4a72c5ced\"\n                }\n            }\n        ]\n    },\n    {\n        \"repo_name\": \"PJATK\",\n        \"owner_login\": \"P4ZD4N\",\n        \"branches\": [\n            {\n                \"name\": \"main\",\n                \"last_commit\": {\n                    \"sha\": \"93df11e4c8cde3a1862619e7902c24f22ea64fa2\"\n                }\n            }\n        ]\n    },\n    {\n        \"repo_name\": \"product-preview-card-component\",\n        \"owner_login\": \"P4ZD4N\",\n        \"branches\": [\n            {\n                \"name\": \"main\",\n                \"last_commit\": {\n                    \"sha\": \"65b8adc9778c6fed57e90fba387e8f247841ff5c\"\n                }\n            }\n        ]\n    },\n    {\n        \"repo_name\": \"qr-code-component\",\n        \"owner_login\": \"P4ZD4N\",\n        \"branches\": [\n            {\n                \"name\": \"main\",\n                \"last_commit\": {\n                    \"sha\": \"865ddb811d2a4a052cb891626a4e3cfe49aa1856\"\n                }\n            },\n            {\n                \"name\": \"master\",\n                \"last_commit\": {\n                    \"sha\": \"3b3825995c2c14a22da932ad43a001ce330aabf2\"\n                }\n            }\n        ]\n    },\n    {\n        \"repo_name\": \"stats-preview-card-component-main\",\n        \"owner_login\": \"P4ZD4N\",\n        \"branches\": [\n            {\n                \"name\": \"master\",\n                \"last_commit\": {\n                    \"sha\": \"da965d58e066e7d79f53f3ace67d3197dbb06b7e\"\n                }\n            }\n        ]\n    }\n]\n```\n## Errors\n\nWhen an error occurs, the application will return a response with appropriate HTTP Status code and message with the following structure:\n\n```\n{\n  \"status\": \"${httpStatusCode}\",\n  \"message\": \"${errorMessage}\"\n}\n```\n\n## Running Tests\n\nNavigate the project directory\n\n```bash\n cd /path/to/atipera\n```\n\nTo run tests, run the following command\n\n```bash\n./mvnw test\n```\n\nIf Maven is installed globally:\n\n```\nmvn test\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fp4zd4n%2Fatipera","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fp4zd4n%2Fatipera","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fp4zd4n%2Fatipera/lists"}