convert git commit history to JSON format, blazing fast
123
Git Repo: Git-History
Git-History is a tool that generates a JSON representation of the Git history for a repository. You can use it either as a command-line tool or as a server providing an API.
Generate a JSON file containing Git history:
cargo run --release index <path_to_git_repo>
This command will create a JSON file in the current directory and print it to the terminal.
Start a server to provide Git history via an API:
cargo run --release server
The server will be available at http://localhost:8080.
POST /git_history
http://localhost:8080/git_history{
"repo": "<path_to_git_repo>"
}
Request Git history using curl:
curl -X POST -H "Content-Type: application/json" -d '{"repo": "github.com/himanshu-at/git-history"}' http://localhost:8080/git_history
Build and run the Docker image:
docker compose up -d
Alternatively, use the pre-built Docker image from Docker Hub:
Create a docker-compose.yml file:
services:
backend:
image: himanshu806/git-history:0.1.0
# build:
# context: .
# dockerfile: dockerfile
ports:
- 8080:8080
command: cargo run --release server
The JSON response includes an array of commit objects with the following structure:
[
{
"commit_id": "commit_hash",
"author": "author_name",
"message": "commit_message",
"pl_and_issue_id": "pull_request_and_issue_id",
"files": [
{
"file": "file_name",
"diff": "diff_content"
}
]
}
]
This project is licensed under the MIT License.
Content type
Image
Digest
sha256:aebe4ca92…
Size
476 MB
Last updated
over 1 year ago
docker pull himanshu806/git-history:0.1.0