Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions lib/config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
// lib/config.ts

export const CONTRIBUTION_MILESTONES = [1, 10, 100, 250, 500, 1000];
export const STREAK_MILESTONES = [3, 7, 30, 100];
3 changes: 1 addition & 2 deletions lib/github.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import type { ContributionCalendar, ContributionDay } from '../types';
import { calculateStreak } from './calculate';
import { TTLCache } from './cache';
import { LANGUAGE_COLORS } from './svg/languageColors';
import { CONTRIBUTION_MILESTONES, STREAK_MILESTONES } from './config';

interface GitHubRepo {
stargazers_count: number;
Expand All @@ -14,8 +15,6 @@ interface GitHubRepo {
const MAX_RETRIES = 3;
// Initial delay in ms; doubles on each retry.
const BASE_DELAY_MS = 500;
const CONTRIBUTION_MILESTONES = [1, 10, 100, 250, 500, 1000];
const STREAK_MILESTONES = [3, 7, 30, 100];
const GRAPHQL_TIMEOUT_MS = 8000; // 8s for GraphQL endpoint
const REST_TIMEOUT_MS = 5000; // 5s for REST endpoints

Expand Down
Loading