git_timesheet: Identify work streaks from Git history

View source: R/git_timesheet.R

git_timesheetR Documentation

Identify work streaks from Git history

Description

Identify work streaks from Git history

Usage

git_timesheet(dir = ".", threshold = 75)

Arguments

dir

path to Git repo

threshold

number of minutes. Commits further apart than threshold belong to different streaks

Details

For every commit the function estimates the "commit time" which is the amount of time spent working towards that commit. Current approach is rather naive:

  1. Break the data into streaks using threshold

  2. For every streak:

    • All but first commit get commit time equal to the time difference from the previous commit.

    • For the first commit the commit time is the mean of all commits in the streak.

  3. For streaks of length one the commit time is the mean of all commit times for the repo.

Value

Tibble with columns:

  • streak - Streak ID

  • from - Date-time, start of the work streak

  • to - Date-time, end of the work streak


mbojan/mbtools documentation built on Oct. 16, 2023, 8:18 p.m.