From 78f43e7fdffeacfb89731d0ddc6caabe0d2abef7 Mon Sep 17 00:00:00 2001 From: Oded Ben Ozer Date: Thu, 12 Dec 2024 09:06:16 +0100 Subject: [PATCH] Apply suggestions from code review Co-authored-by: Yazdan Mohammadi --- internal/pkg/githubapi/pr_metrics.go | 4 ++-- internal/pkg/githubapi/pr_metrics_test.go | 4 ---- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/internal/pkg/githubapi/pr_metrics.go b/internal/pkg/githubapi/pr_metrics.go index ac8d0230..0e734a47 100644 --- a/internal/pkg/githubapi/pr_metrics.go +++ b/internal/pkg/githubapi/pr_metrics.go @@ -81,8 +81,8 @@ func isPrStalePending(commitStatuses *github.CombinedStatus, timeToDefineStale t return false } -// getPrMetrics itterates through all clients , gets all repos and then all PRs and calculates metrics -// This assumes Telefonsitka uses a GitHub App style of authentication as it uses the Apps.ListRepos call +// getPrMetrics iterates through all clients , gets all repos and then all PRs and calculates metrics +// getPrMetrics assumes Telefonsitka uses a GitHub App style of authentication as it uses the Apps.ListRepos call // When using personal access token authentication, Telefonistka is unaware of the "relevant" repos (at least it get a webhook from them). func getPrMetrics(mainGhClientCache *lru.Cache[string, GhClientPair]) { ctx, cancel := context.WithTimeout(context.Background(), 1*time.Minute) diff --git a/internal/pkg/githubapi/pr_metrics_test.go b/internal/pkg/githubapi/pr_metrics_test.go index 5018c45f..f1a90d87 100644 --- a/internal/pkg/githubapi/pr_metrics_test.go +++ b/internal/pkg/githubapi/pr_metrics_test.go @@ -1,9 +1,5 @@ package githubapi -// @Title -// @Description -// @Author -// @Update import ( "testing" "time"