Skip to content

kevinah95/KDriller

Repository files navigation

KDriller

GitHub license Maven Central Sonatype Nexus (Snapshots) Kotlin FOSSA Status

KDriller is a Kotlin framework that helps developers in analyzing Git repositories. With KDriller you can easily extract information about commits, developers, modified files, diffs, and source code.

About this repository

This project is a kotlin implementation of PyDriller by Davide Spadini, originally from PyDriller.

Quick usage

import kdriller

val pathToRepo = listOf("https://github.com/ishepard/pydriller.git")
for(commit in Repository(pathToRepo).traverseCommits()){
        println(commit.hash)
        println(commit.msg)
        println(commit.author.name)
    }

Installation

with Gradle

repositories {
    mavenCentral()
}

dependencies {
    implementation("com.github.kevinah95:kdriller:[version]")
}

How to contribute

First clone the repository:

git clone https://github.com/kevinah95/kdriller.git
cd kdriller

(Important) I tend to not accept Pull Requests without tests, so:

  • unzip the test-repos.zip zip file in src/commonTest/resources/test-repos.zip.
  • inside are many "small repositories" that were manually created to test KDriller. Use one of your choice to test your feature (check the existing tests for inspiration)
  • if none is suitable for testing your feature, create a new one. Be careful: if you create a new one, do not forget to upload a new zip file test-repos.zip that includes your new repository, otherwise the tests will fail.

To run the tests use gradle.

License

FOSSA Status