Monorepo for Tangled
tangled.org
1import type {
2 RepositoryCardData,
3 IssueCardData,
4 PullRequestCardData,
5} from "../validation";
6
7const LONG_TITLE =
8 "fix critical memory leak in WebSocket connection handler that causes server crashes under high load conditions in production environments";
9
10export const createRepoData = (avatarUrl: string): RepositoryCardData => ({
11 type: "repository",
12 repoName: "core",
13 ownerHandle: "tangled.org",
14 stars: 746,
15 pulls: 82,
16 issues: 176,
17 createdAt: "2026-01-29T00:00:00Z",
18 avatarUrl,
19 languages: [
20 { color: "#00ADD8", percentage: 50 },
21 { color: "#e34c26", percentage: 30 },
22 { color: "#7e7eff", percentage: 10 },
23 { color: "#663399", percentage: 5 },
24 { color: "#f1e05a", percentage: 5 },
25 ],
26});
27
28export const createIssueData = (
29 avatarUrl: string,
30 overrides?: Partial<IssueCardData>,
31): IssueCardData => ({
32 type: "issue",
33 repoName: "core",
34 ownerHandle: "tangled.org",
35 authorHandle: "oppi.li",
36 avatarUrl,
37 authorAvatarUrl: avatarUrl,
38 title: "feature request: sync fork button",
39 issueNumber: 8,
40 status: "open",
41 labels: [
42 { name: "feature", color: "#4639d6" },
43 { name: "help-wanted", color: "#008672" },
44 { name: "enhancement", color: "#0052cc" },
45 ],
46 commentCount: 12,
47 reactionCount: 5,
48 createdAt: "2026-01-29T00:00:00Z",
49 ...overrides,
50});
51
52export const createPullRequestData = (
53 avatarUrl: string,
54 overrides?: Partial<PullRequestCardData>,
55): PullRequestCardData => ({
56 type: "pullRequest",
57 repoName: "core",
58 ownerHandle: "tangled.org",
59 authorHandle: "oppi.li",
60 avatarUrl,
61 authorAvatarUrl: avatarUrl,
62 title: "add author description to README.md",
63 pullRequestNumber: 1,
64 status: "open",
65 filesChanged: 2,
66 additions: 116,
67 deletions: 59,
68 rounds: 3,
69 commentCount: 12,
70 reactionCount: 31,
71 createdAt: "2026-01-29T00:00:00Z",
72 ...overrides,
73});
74
75export const createLongTitleIssueData = (
76 avatarUrl: string,
77 overrides?: Partial<IssueCardData>,
78): IssueCardData => ({
79 ...createIssueData(avatarUrl),
80 title: LONG_TITLE,
81 ...overrides,
82});
83
84export const createLongTitlePullRequestData = (
85 avatarUrl: string,
86 overrides?: Partial<PullRequestCardData>,
87): PullRequestCardData => ({
88 ...createPullRequestData(avatarUrl),
89 title: LONG_TITLE,
90 ...overrides,
91});
92
93