From 5c0167cfb5a85ec14c6ac65b9d11fcc43f5ec677 Mon Sep 17 00:00:00 2001 From: Mauro Stettler Date: Mon, 13 May 2024 14:10:17 +0200 Subject: [PATCH 1/2] simplify Signed-off-by: Mauro Stettler --- pkg/icassigner/busyness/busyness.go | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) 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] From b7fc7ee03dfa7cba2b8a4f17ac9054b6dc138057 Mon Sep 17 00:00:00 2001 From: Mauro Stettler Date: Mon, 13 May 2024 14:13:31 +0200 Subject: [PATCH 2/2] update readme Signed-off-by: Mauro Stettler --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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.