Skip to content

Commit

Permalink
fix: remove response time metric for now
Browse files Browse the repository at this point in the history
  • Loading branch information
ajhenry committed Feb 1, 2024
1 parent 84b1193 commit 0b2b0f4
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 10 deletions.
12 changes: 4 additions & 8 deletions ts-backend/src/fetchers/issues.ts
Original file line number Diff line number Diff line change
Expand Up @@ -217,29 +217,25 @@ const calculateIssueResponseTime = async (
export const addIssueMetricsData: Fetcher = async (result, octokit, config) => {
for (const repoName of Object.keys(result.repositories)) {
const {
issuesCount: openIssuesCount,
issuesAverageAge: openIssuesAverageAge,
issuesMedianAge: openIssuesMedianAge,
} = await calculateIssueMetricsPerRepo(repoName, "open", octokit, config);

const {
issuesCount: closedIssuesCount,
issuesAverageAge: closedIssuesAverageAge,
issuesMedianAge: closedIssuesMedianAge,
} = await calculateIssueMetricsPerRepo(repoName, "closed", octokit, config);

const { issuesResponseAverageAge, issuesResponseMedianAge } =
await calculateIssueResponseTime(repoName, octokit, config);
// const { issuesResponseAverageAge, issuesResponseMedianAge } =
// await calculateIssueResponseTime(repoName, octokit, config);

const repo = result.repositories[repoName];
repo.openIssuesCount = openIssuesCount;
repo.openIssuesAverageAge = openIssuesAverageAge;
repo.openIssuesMedianAge = openIssuesMedianAge;
repo.closedIssuesCount = closedIssuesCount;
repo.closedIssuesAverageAge = closedIssuesAverageAge;
repo.closedIssuesMedianAge = closedIssuesMedianAge;
repo.issuesResponseAverageAge = issuesResponseAverageAge;
repo.issuesResponseMedianAge = issuesResponseMedianAge;
// repo.issuesResponseAverageAge = issuesResponseAverageAge;
// repo.issuesResponseMedianAge = issuesResponseMedianAge;
}

return result;
Expand Down
6 changes: 4 additions & 2 deletions ts-backend/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,10 @@ export interface RepositoryResult {
openIssuesMedianAge: number;
closedIssuesAverageAge: number;
closedIssuesMedianAge: number;
issuesResponseAverageAge: number;
issuesResponseMedianAge: number;

// Will be added at a later time
// issuesResponseAverageAge: number;
// issuesResponseMedianAge: number;
}

export type Fetcher = (
Expand Down

0 comments on commit 0b2b0f4

Please sign in to comment.