master
 1import { User } from './task/user/user.graphql.js'
 2import { PullRequest as PullRequestType } from './task/pulls/pulls.graphql.js'
 3import { Issue as IssueType } from './task/issues/issues.graphql.js'
 4import {
 5  DiscussionComment as DiscussionCommentType,
 6  IssueComment as IssueCommentType,
 7} from './task/comments/comments.graphql.js'
 8import { StarredRepo } from './task/stars/stars.graphql.js'
 9import { Commit } from './task/commits/commits.graphql.js'
10import { Reaction } from './task/reactions/reactions.graphql.js'
11import { Repository as RepositoryType } from './task/repos/repos.graphql.js'
12
13// Data is collected by tasks, enriched if needed, and saved to disk.
14// Use this data to determine which badges to present to the user.
15export type Data = {
16  user: User
17  starredRepositories: StarredRepo[]
18  repos: Repository[]
19  pulls: PullRequest[]
20  issues: Issue[]
21  issueComments: IssueComment[]
22  discussionComments: DiscussionComment[]
23}
24
25export type Repository = {
26  commits: Commit[]
27} & RepositoryType
28
29export type Issue = {
30  closedBy?: string
31  reactions?: Reaction[]
32} & IssueType
33
34export type PullRequest = {
35  reactions?: Reaction[]
36} & PullRequestType
37
38export type IssueComment = {
39  reactions?: Reaction[]
40} & IssueCommentType
41
42export type DiscussionComment = {
43  reactions?: Reaction[]
44} & DiscussionCommentType