-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathGithubIssueChallenge.ts
More file actions
81 lines (77 loc) · 1.51 KB
/
GithubIssueChallenge.ts
File metadata and controls
81 lines (77 loc) · 1.51 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
import {
Challenge,
Evaluation,
Format,
Participant,
Submission,
Transformer,
Judge,
} from "../../challenges-platform/models";
export class GithubIssueChallengeSubmission extends Submission {
issueId: string;
repositoryId: string;
constructor({
id,
uuid,
issueId,
repositoryId,
challenge,
participant,
assignee,
}: {
id: number;
uuid: string;
issueId: string;
repositoryId: string;
challenge: Challenge;
participant: Participant;
assignee: Judge | null;
}) {
super({ id, uuid, challenge, participant, assignee });
this.issueId = issueId;
this.repositoryId = repositoryId;
}
}
export class GithubIssueChallenge extends Challenge {
constructor({
id,
uuid,
title,
body,
points,
}: {
id: number;
uuid: string;
title: string;
body: string;
points: number;
}) {
super({
id,
uuid,
title,
body,
format: Format.MARKDOWN,
points,
evaluation: Evaluation.MANUAL,
deleted: false,
});
}
}
export class GithubIssueTransformer extends Transformer {
dbToChallengeObject() {
throw new Error("Method not implemented.");
}
challengeObjectToDb() {
throw new Error("Method not implemented.");
}
dbToSubmissionObject() {
throw new Error("Method not implemented.");
}
submissionObjectToDb() {
throw new Error("Method not implemented.");
}
buildSubmission(submissionBody: any) {
throw new Error("Method not implemented.");
}
}