File size: 1,926 Bytes
b59aa07
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
82
83
84
85
86
87
import { http, HttpResponse } from "msw";
import { SuggestedTask } from "#/components/features/home/tasks/task.types";

const TASKS_1: SuggestedTask[] = [
  {
    issue_number: 6968,
    title: "Fix merge conflicts",
    repo: "octocat/hello-world",
    task_type: "MERGE_CONFLICTS",
    git_provider: "github",
  },
];

const TASKS_2: SuggestedTask[] = [
  {
    issue_number: 268,
    title: "Fix broken CI checks",
    repo: "octocat/earth",
    task_type: "FAILING_CHECKS",
    git_provider: "github",
  },
  {
    issue_number: 281,
    title: "Fix issue",
    repo: "octocat/earth",
    task_type: "UNRESOLVED_COMMENTS",
    git_provider: "github",
  },
  {
    issue_number: 293,
    title: "Update documentation",
    repo: "octocat/earth",
    task_type: "OPEN_ISSUE",
    git_provider: "github",
  },
  {
    issue_number: 305,
    title: "Refactor user service",
    repo: "octocat/earth",
    task_type: "FAILING_CHECKS",
    git_provider: "github",
  },
  {
    issue_number: 312,
    title: "Fix styling bug",
    repo: "octocat/earth",
    task_type: "FAILING_CHECKS",
    git_provider: "github",
  },
  {
    issue_number: 327,
    title: "Add unit tests",
    repo: "octocat/earth",
    task_type: "FAILING_CHECKS",
    git_provider: "github",
  },
  {
    issue_number: 331,
    title: "Implement dark mode",
    repo: "octocat/earth",
    task_type: "FAILING_CHECKS",
    git_provider: "github",
  },
  {
    issue_number: 345,
    title: "Optimize build process",
    repo: "octocat/earth",
    task_type: "FAILING_CHECKS",
    git_provider: "github",
  },
  {
    issue_number: 352,
    title: "Update dependencies",
    repo: "octocat/earth",
    task_type: "FAILING_CHECKS",
    git_provider: "github",
  },
];

export const MOCK_TASKS = [...TASKS_1, ...TASKS_2];

export const TASK_SUGGESTIONS_HANDLERS = [
  http.get("/api/user/suggested-tasks", async () =>
    HttpResponse.json(MOCK_TASKS),
  ),
];