Table of Contents
Code stats is a project that allows you to make reports of git repositories. With these reports you can see the how someone contributes to a project and many more.
To get a local copy up and running follow these simple example steps.
This is an example of how to list things you need to use the software and how to install them.
- docker & docker-compose
sudo apt install docker docker-compose
- /backend/.env
check .env.example
- Clone the repo
git clone https://github.com/maneike/codeStats.git
- Add .env to /backend/
check .env.example
- Build with docker compose
docker compose up --build
- In new terminal
docker compose run backend python3 manage.py makemigrations
docker compose run backend python3 manage.py migrate
- Optional
docker compose run backend python3 manage.py createsuperuser
To start the project after building
docker compose up
To stop the project
docker compose down -v
For more examples, please refer to the Documentation
POST /api/url/
{
"receivers": ["email@example.com"],
"mergedUrls": [
{
"old": {
"name": "PRA2021-PRA2022",
"url": "https://github.com/WitMar/PRA2021-PRA2022.git"
},
"new": {
"name": "PRA2021-PRA2022",
"url": "https://github.com/WitMar/PRA2021-PRA2022.git"
}
}
]
}
{
"data": [
{
"repo_name": "PRA2021-PRA2022",
"users": [
{
"name": "marcin witkowski",
"email": "marcin.witkowski@e-qsg.com"
},
{
"name": "THINK",
"email": "witkowski.mar@gmail.com"
}
],
"languages": ["Java"]
}
]
}
POST /api/merged/
{
"repo_name": "PRA2021-PRA2022",
"merged_users": [
{
"old_name": "marcin witkowski",
"old_email": "marcin.witkowski@e-qsg.com",
"new_name": "marcin witkowski",
"new_email": "marcin.witkowski@e-qsg.com"
},
{
"old_name": "THINK",
"old_email": "witkowski.mar@gmail.com",
"new_name": "THINK",
"new_email": "witkowski.mar@gmail.com"
},
{
"old_name": "Tomasz Zietkiewicz",
"old_email": "tomek.zietkiewicz@gmail.com",
"new_name": "Tomasz Zietkiewicz",
"new_email": "tomek.zietkiewicz@gmail.com"
}
],
"languages": ["Java"]
}
{
"ok": "Raport jest w trakcie tworzenia"
}
GET /api/report/:{repo_name}/
{
"branches": [
{
"branch_name": "HEAD",
"commits": [
{
"author": "marcin witkowski",
"branch": "HEAD",
"date": "2020-10-18 16:24:11+02:00",
"message": "Initial commit",
"changed_files": [
{
"file_name": "pom.xml",
"changes": {
"insertions": 11,
"deletions": 0,
"lines": 11
}
},
{
"file_name": "src/main/java/introduction/HelloWorld.java",
"changes": {
"insertions": 8,
"deletions": 0,
"lines": 8
}
}
]
}
]
}
]
}
Distributed under the MIT License. See LICENSE.txt
for more information.
Project Link: https://github.com/maneike/codeStats
- Depending on your system, you might need to change CLRF to LF in the .env and Dockerfile/compose files. This can be done easily in VSCode by right clicking on the file and selecting "Change End of Line Sequence" and then selecting LF.