forked from kudos-ink/base-api
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmock_data.bash
More file actions
119 lines (107 loc) · 2.76 KB
/
mock_data.bash
File metadata and controls
119 lines (107 loc) · 2.76 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
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
#!/bin/bash
BASE_URL=${BASE_URL:-"http://localhost:8000"}
AUTH_HEADER="Authorization: Basic ${AUTH_TOKEN}"
CONTENT_TYPE_HEADER="Content-Type: application/json"
# Create Polkadot project
curl --location "$BASE_URL/projects" \
--header "$AUTH_HEADER" \
--header "$CONTENT_TYPE_HEADER" \
--data '{
"name": "polkadot",
"slug":"polkadot",
"avatar":"https://cryptologos.cc/logos/polkadot-new-dot-logo.png"
}'
# Create Asar project
curl --location "$BASE_URL/projects" \
--header "$AUTH_HEADER" \
--header "$CONTENT_TYPE_HEADER" \
--data '{
"name": "astar",
"slug":"astar"
}'
# Create Polkadot SDK repository
curl --location "$BASE_URL/repositories" \
--header "$AUTH_HEADER" \
--header "$CONTENT_TYPE_HEADER" \
--data '{
"name": "Polkadot SDK",
"slug": "polkadotsdk",
"language_slug": "rust",
"url": "https://github.com/paritytech/polkadot-sdk",
"project_id": 1
}'
# Create Zombienet repository
curl --location "$BASE_URL/repositories" \
--header "$AUTH_HEADER" \
--header "$CONTENT_TYPE_HEADER" \
--data '{
"name": "Zombienet",
"slug": "zombienet",
"language_slug": "rust",
"url": "https://github.com/paritytech/zombienet",
"project_id": 1
}'
# Create Astar repository
curl --location "$BASE_URL/repositories" \
--header "$AUTH_HEADER" \
--header "$CONTENT_TYPE_HEADER" \
--data '{
"name": "Astar",
"slug": "astar",
"language_slug": "rust",
"url": "https://github.com/AstarNetwork/Astar",
"project_id": 2
}'
# Create issues
curl --location "$BASE_URL/issues" \
--header "$AUTH_HEADER" \
--header "$CONTENT_TYPE_HEADER" \
--data '{
"number": 1863,
"title": "Adding separate label to the zombie namespaces",
"open": true,
"certified": false,
"repository_id": 1,
"issue_created_at": "2024-09-03T09:13:54Z"
}'
curl --location "$BASE_URL/issues" \
--header "$AUTH_HEADER" \
--header "$CONTENT_TYPE_HEADER" \
--data '{
"number": 5597,
"title": "Fix balance to u256 type",
"open": true,
"certified": false,
"repository_id": 2,
"issue_created_at": "2024-09-03T09:13:54Z"
}'
curl --location "$BASE_URL/issues" \
--header "$AUTH_HEADER" \
--header "$CONTENT_TYPE_HEADER" \
--data '{
"number": 1350,
"title": "Update mocks to use TestDefaultConfig",
"open": true,
"certified": false,
"repository_id": 3,
"issue_created_at": "2024-09-03T09:13:54Z"
}'
# Cretae users
curl --location "$BASE_URL/users" \
--header "$AUTH_HEADER" \
--header "$CONTENT_TYPE_HEADER" \
--data '{
"username": "leapalazzolo"
}'
curl --location "$BASE_URL/users" \
--header "$AUTH_HEADER" \
--header "$CONTENT_TYPE_HEADER" \
--data '{
"username": "CJ13th"
}'
curl --location "$BASE_URL/users" \
--header "$AUTH_HEADER" \
--header "$CONTENT_TYPE_HEADER" \
--data '{
"username": "ipapandinas"
}'