Skip to content

alexejsailer/git-analytics-docker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

37 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

git-analytics-docker

Analyze the history and manage your own git repositories!

http://creativecommons.org/licenses/by-nc-nd/3.0/

Foo

How to install and start

Make sure you have allocated minimum 6gig RAM to your docker-host.

Just adapt and run the docker-compose.yml file. Please adapt the docker host ip.

  • API_HOST=192.168.99.100

This ip will be used by the angular client, which will be available at this address.

Option 1

Directly analyze a complete GitHub account:

curl -u admin:test -d "{\"name\": \"alexejsailer\",\"projectId\": \"myRepos\"}" -H "Content-Type: application/json" -X POST http://192.168.99.100:8090/repository-fetcher/api/v1/projects

That may take some time, as it will use the github api to get all clone urls for this account. It waits between each repository api call. After you get a response you can run

curl -u admin:test -d "{\"command\": \"FETCH_PROJECT\"}" -H "Content-Type: application/json" -X POST http://192.168.99.100:8090/repository-fetcher/api/v1/commands

To clone all projects into the repository folder and to transfer all commits to elasticsearch for further analyse.

Option 2

Copy git repositories you want to analyze to the repository folder. Please make sure, that your docker-host is not open to the world so that all services remain bound to a hidden network. In future I will secure the client with a password and hide all elasticsearch ports.

You may want to group your repositories by projects:

repository->project0->r1,r2,r3

repository->project1->r1,r2,r3

Run this curl command to start fetching all commits from your repositories:

curl -u admin:test -d "{\"command\": \"FETCH\"}" -H "Content-Type: application/json" -X POST http://192.168.99.100:8090/repository-fetcher/api/v1/commands

After some time you should find a result, like shown by the screenshots, at 192.168.99.100.

Have fun.

Angular Client:

http://192.168.99.100

Kibana Client

http://192.168.99.100:5601

Where 192.168.99.100 is your dockerhost ip.

Foo

Foo

Foo

Foo

Example

curl -u admin:test -d "{\"name\": \"JabRef\",\"projectId\": \"myRepos\"}" -H "Content-Type: application/json" -X POST http://192.168.99.100:8090/repository-fetcher/api/v1/projects
curl -u admin:test -d "{\"command\": \"FETCH_PROJECT\"}" -H "Content-Type: application/json" -X POST http://192.168.99.100:8090/repository-fetcher/api/v1/commands

Wait some time until it transfers all commits completely to elasticsearch.

Firefox_Screenshot_2020-01-16T21-36-40 782Z

Websites using this source code:

https://www.cryptocoin-check.com

Alt text

Alt text

Foo

Notice

No Warranty: THE SUBJECT SOFTWARE IS PROVIDED "AS IS" WITHOUT ANY WARRANTY OF ANY KIND, EITHER EXPRESSED, IMPLIED, OR STATUTORY, INCLUDING, BUT NOT LIMITED TO, ANY WARRANTY THAT THE SUBJECT SOFTWARE WILL CONFORM TO SPECIFICATIONS, ANY IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR FREEDOM FROM INFRINGEMENT, ANY WARRANTY THAT THE SUBJECT SOFTWARE WILL BE ERROR FREE, OR ANY WARRANTY THAT DOCUMENTATION, IF PROVIDED, WILL CONFORM TO THE SUBJECT SOFTWARE.

About

Analyze the history and manage your own git repositories!

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published