diff --git a/README.md b/README.md index 4242c43..acf6b83 100644 --- a/README.md +++ b/README.md @@ -69,9 +69,9 @@ Calendars are accessed either via a public ical feed or via google calendar api #### Determine busyness of individual members of a team -Busyness of team members is calculated by the amount of issues someone is assigned to and which got updated in the past 5 days (not configurable at the moment). Issues updated in this timeframe are taken into account if +Busyness of team members is calculated by the amount of issues someone is assigned to and which got updated in the past 7 days (not configurable at the moment). Issues updated in this timeframe are taken into account if * Open issues: If they don't contain any of the labels which are configured to be ignored. This allows for example to ignore issues which got marked as `stale` -* Closed issues: If they were closed within the lookback time (5 days). +* Closed issues: If they were closed within the lookback time (7 days). The higher this count, the more busy an individual team member is seen compared to other members. diff --git a/pkg/icassigner/busyness/busyness.go b/pkg/icassigner/busyness/busyness.go index 2502f67..3a2d72a 100644 --- a/pkg/icassigner/busyness/busyness.go +++ b/pkg/icassigner/busyness/busyness.go @@ -63,12 +63,7 @@ func CalculateBusynessForTeam(ctx context.Context, now time.Time, githubClient * } func calculateBusynessForTeam(ctx context.Context, now time.Time, bA busynessClient, members []string) Report { - // calculate lookback time. If we are on a time shortly after the weekend we'll extend to lookback by 2 days to account for weekends - // TODO: Should this be configurable? - since := now.Add(-5 * 24 * time.Hour) - if since.Weekday() == time.Saturday || since.Weekday() == time.Sunday { - since = since.Add(-2 * 24 * time.Hour) - } + since := now.Add(-7 * 24 * time.Hour) addMember := func(b map[int][]string, m string, busyness int) { v, ok := b[busyness]