- IntelliJ Idea Community Edition (Download)
- Java SDK (JDK)
- If JDK is missing, don't worry, IntelliJ will assist you installing JDK from the IDE. See troubleshooting.
Clone repo with your favorite tool, or with CLI using following command
git clone https://github.com/hossain-khan/github-stats.git
Open the checked out directory in IntelliJ IDEA
ℹ️ Instead of using IntelliJ, you can use Gradle command after configuring
local.properties./gradlew run
Once project is synced using gradle, you should see the project load like following
Run the provided script to automatically create local.properties with date ranges set:
./local-prop-init.shThis will:
- Copy
local_sample.propertiestolocal.properties - Set
date_limit_afterto one month ago - Set
date_limit_beforeto today's date
Then update the following required values in local.properties:
api_client_type- ChooseRETROFIT(default) orGH_CLI. See API Clients Guide for details.access_token- Generate a token (only required forRETROFIT)repository_owner- Your GitHub org/user namerepository_id- Your repository nameauthors- Comma-separated list of GitHub user IDs
Rename the provided local_sample.properties to local.properties.
Generate token and update other configurations as appropriate
Once configuration is in place, all you need to do is open the Main.kt and
You can also use following gradle command to run the stats generator
./gradlew run
See troubleshooting section if you encounter issue.
Once the generator app finishes running, you will see report in the project root directory that contains both ASCII and CSV report.
Here is sample snapshot of reports from different repositories:
If you see following error, it could be your token is not setup, or you have exceeded API rate limit.
Exception in thread "main" retrofit2.HttpException: HTTP 401
To see detailed API request information, you can modify BuildConfig and set DEBUG_HTTP_REQUESTS to true, then rebuild the project. This is a compile-time constant that enables detailed HTTP request/response logging.
Missing
Finally, click on the gradle sync button (🐘🔁) and wait for the sync to complete. If everything went well you should see the main() in the Main.kt file.









