GitHelper (LowEndInsight v0.9.0)

Copy Markdown View Source

Collection of lower-level functions for analyzing outputs from git command.

Summary

Types

contrib_count()

@type contrib_count() :: %{required(String.t()) => integer()}

Functions

get_avg_tag_commit_time_diff(list)

get_avg_tag_commit_tim_diff/1: return the average time between commits within each subarray representing a tag

get_contributor_counts(list)

get_contributor_counts/1: Gets the number of contributions belonging to each author and return a map of %{name => number}

get_filtered_contributor_count(map, total)

@spec get_filtered_contributor_count(contrib_count(), non_neg_integer()) ::
  {:ok, non_neg_integer(), [contrib_count()]}
det_filtered_contributor_count/2: Gets the resolved list of contributers, return count and list

get_total_tag_commit_time_diff(list)

get_total_tag_commit_time_diff/1: return the total time between commits within each subarray representing a tag

parse_diff(list)

@spec parse_diff([String.t()]) ::
  {:ok, non_neg_integer(), non_neg_integer(), non_neg_integer()}
parse_diff/1: returns the relevant information contained in the last array position of a diff array

parse_header(contributor)

parse_shortlog(log)

@spec parse_shortlog(String.t()) :: [Contributor.t()]

split_commits_by_tag(list)

split_commits_by_tag/1: returns a list with sublists arranged by tag