LowEndInsight v0.5.0 GitModule View Source

Collections of functions for interacting with the git command to perform queries.

Link to this section Summary

Functions

clone_repo/2: clones the repo

get_commit_dates/1: returns a list of unix timestamps representing commit times

get_contributions_map/1: returns a map of contributions per git user note: this map is unfiltered, dupes aren't identified

get_contributors_count/1: returns the number of contributors for a given Git repo

get_default_branch/1: returns the default branch of the remote repo

get_last_n_commits/2: returns a list of lines generated from the diff of two commits

get_current_hash/1: returns the hash of the repo's HEAD

get_last_2_delta/1: returns the lines changed, files changed, additions and deletions in the last commit

get_last_commit_date/1: returns the date of the last commit

get_last_n_commits/1: returns a list of the short hashes of the last n commits

get_recent_changes/1: returns the percentage of changed lines in the last commit by the total lines in the repo

get_repo/1: gets a repo by path, returns Repository struct

get_tag_and_commit_dates/1: returns a list of lists of unix timestamps representing commit times with each lsit belonging to a different tag

get_total_lines/1: returns the total lines and files contained in a repo as of the latest commit

Link to this section Functions

Link to this function

clone_repo(url, tmp_path)

View Source

clone_repo/2: clones the repo

get_commit_dates/1: returns a list of unix timestamps representing commit times

Link to this function

get_contributions_map(repo)

View Source

get_contributions_map/1: returns a map of contributions per git user note: this map is unfiltered, dupes aren't identified

Link to this function

get_contributor_count(repo)

View Source

get_contributors_count/1: returns the number of contributors for a given Git repo

Link to this function

get_contributor_distribution(repo)

View Source
get_contributor_distribution(Git.Repository.t()) ::
  {:ok, map(), non_neg_integer()}
Link to this function

get_default_branch(repo)

View Source

get_default_branch/1: returns the default branch of the remote repo

Link to this function

get_diff_2_commits(repo, list)

View Source

get_last_n_commits/2: returns a list of lines generated from the diff of two commits

Link to this function

get_functional_contributors(repo)

View Source
get_functional_contributors(Git.Repository.t()) ::
  {:ok, non_neg_integer(), [any()]}

get_current_hash/1: returns the hash of the repo's HEAD

get_last_2_delta/1: returns the lines changed, files changed, additions and deletions in the last commit

Link to this function

get_last_commit_date(repo)

View Source

get_last_commit_date/1: returns the date of the last commit

Link to this function

get_last_n_commits(repo, n)

View Source

get_last_n_commits/1: returns a list of the short hashes of the last n commits

Link to this function

get_recent_changes(repo)

View Source

get_recent_changes/1: returns the percentage of changed lines in the last commit by the total lines in the repo

get_repo/1: gets a repo by path, returns Repository struct

Link to this function

get_tag_and_commit_dates(repo)

View Source

get_tag_and_commit_dates/1: returns a list of lists of unix timestamps representing commit times with each lsit belonging to a different tag

Link to this function

get_top10_contributors_map(repo)

View Source
get_top10_contributors_map(Git.Repository.t()) :: {:ok, [any()]}

get_total_lines/1: returns the total lines and files contained in a repo as of the latest commit