Skip to content

Commit a7c6a52

Browse files
authored
Merge pull request #605 from dzcode-io/project-detail
feat: Project detail page
2 parents b9d817a + 651ce39 commit a7c6a52

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

60 files changed

+6440
-4906
lines changed

.github/workflows/cd.deploy.stg.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,8 @@ jobs:
4848
run: npx lerna run bundle:alone --scope @dzcode.io/web
4949
- name: "Sentry Release"
5050
run: npm run generate:sentry-release $DEPLOY_VERSION stage ${{ secrets.SENTRY_AUTH_TOKEN }}
51+
- name: "Pre-deploy"
52+
run: npm run pre-deploy
5153
- name: "Deploy"
5254
run: npm run deploy:stg
5355

.github/workflows/cd.deploy.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,8 @@ jobs:
4747
run: npx lerna run bundle:alone --scope @dzcode.io/web
4848
- name: "Sentry Release"
4949
run: npm run generate:sentry-release $DEPLOY_VERSION production ${{ secrets.SENTRY_AUTH_TOKEN }}
50+
- name: "Pre-deploy"
51+
run: npm run pre-deploy
5052
- name: "Deploy"
5153
run: npm run deploy
5254

.gitignore

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,11 @@ build
2727
src/_e2e-test/downloads
2828
src/_e2e-test/videos
2929
src/_e2e-test/screenshots
30-
cloudflare/public
31-
**/cloudflare/public
30+
cloudflare/public/*
31+
**/cloudflare/public/*
3232
**.lighthouseci
33+
.wrangler
34+
**/cloudflare/wrangler.toml
3335

3436
# mobile
3537
mobile/.expo

api/db/migrations/0000_sudden_doctor_doom.sql renamed to api/db/migrations/0000_melodic_shotgun.sql

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,17 @@ CREATE TABLE `contributions` (
1313
FOREIGN KEY (`contributor_id`) REFERENCES `contributors`(`id`) ON UPDATE no action ON DELETE no action
1414
);
1515
--> statement-breakpoint
16+
CREATE TABLE `contributor_repository_relation` (
17+
`contributor_id` integer NOT NULL,
18+
`repository_id` integer NOT NULL,
19+
`record_imported_at` text DEFAULT CURRENT_TIMESTAMP NOT NULL,
20+
`run_id` text DEFAULT 'initial-run-id' NOT NULL,
21+
`score` integer NOT NULL,
22+
PRIMARY KEY(`contributor_id`, `repository_id`),
23+
FOREIGN KEY (`contributor_id`) REFERENCES `contributors`(`id`) ON UPDATE no action ON DELETE no action,
24+
FOREIGN KEY (`repository_id`) REFERENCES `repositories`(`id`) ON UPDATE no action ON DELETE no action
25+
);
26+
--> statement-breakpoint
1627
CREATE TABLE `contributors` (
1728
`id` integer PRIMARY KEY AUTOINCREMENT NOT NULL,
1829
`record_imported_at` text DEFAULT CURRENT_TIMESTAMP NOT NULL,
@@ -39,6 +50,7 @@ CREATE TABLE `repositories` (
3950
`name` text NOT NULL,
4051
`run_id` text DEFAULT 'initial-run-id' NOT NULL,
4152
`project_id` integer NOT NULL,
53+
`stars` integer NOT NULL,
4254
FOREIGN KEY (`project_id`) REFERENCES `projects`(`id`) ON UPDATE no action ON DELETE no action
4355
);
4456
--> statement-breakpoint

api/db/migrations/0001_black_eternals.sql

Lines changed: 0 additions & 10 deletions
This file was deleted.

api/db/migrations/meta/0000_snapshot.json

Lines changed: 122 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"version": "6",
33
"dialect": "sqlite",
4-
"id": "ba41012f-4495-42ff-ace1-61bd7eaef476",
4+
"id": "2fd49a6b-a3d6-4f53-a4f5-ac67492fc5dd",
55
"prevId": "00000000-0000-0000-0000-000000000000",
66
"tables": {
77
"contributions": {
@@ -82,7 +82,9 @@
8282
"indexes": {
8383
"contributions_url_unique": {
8484
"name": "contributions_url_unique",
85-
"columns": ["url"],
85+
"columns": [
86+
"url"
87+
],
8688
"isUnique": true
8789
}
8890
},
@@ -91,24 +93,113 @@
9193
"name": "contributions_repository_id_repositories_id_fk",
9294
"tableFrom": "contributions",
9395
"tableTo": "repositories",
94-
"columnsFrom": ["repository_id"],
95-
"columnsTo": ["id"],
96+
"columnsFrom": [
97+
"repository_id"
98+
],
99+
"columnsTo": [
100+
"id"
101+
],
96102
"onDelete": "no action",
97103
"onUpdate": "no action"
98104
},
99105
"contributions_contributor_id_contributors_id_fk": {
100106
"name": "contributions_contributor_id_contributors_id_fk",
101107
"tableFrom": "contributions",
102108
"tableTo": "contributors",
103-
"columnsFrom": ["contributor_id"],
104-
"columnsTo": ["id"],
109+
"columnsFrom": [
110+
"contributor_id"
111+
],
112+
"columnsTo": [
113+
"id"
114+
],
105115
"onDelete": "no action",
106116
"onUpdate": "no action"
107117
}
108118
},
109119
"compositePrimaryKeys": {},
110120
"uniqueConstraints": {}
111121
},
122+
"contributor_repository_relation": {
123+
"name": "contributor_repository_relation",
124+
"columns": {
125+
"contributor_id": {
126+
"name": "contributor_id",
127+
"type": "integer",
128+
"primaryKey": false,
129+
"notNull": true,
130+
"autoincrement": false
131+
},
132+
"repository_id": {
133+
"name": "repository_id",
134+
"type": "integer",
135+
"primaryKey": false,
136+
"notNull": true,
137+
"autoincrement": false
138+
},
139+
"record_imported_at": {
140+
"name": "record_imported_at",
141+
"type": "text",
142+
"primaryKey": false,
143+
"notNull": true,
144+
"autoincrement": false,
145+
"default": "CURRENT_TIMESTAMP"
146+
},
147+
"run_id": {
148+
"name": "run_id",
149+
"type": "text",
150+
"primaryKey": false,
151+
"notNull": true,
152+
"autoincrement": false,
153+
"default": "'initial-run-id'"
154+
},
155+
"score": {
156+
"name": "score",
157+
"type": "integer",
158+
"primaryKey": false,
159+
"notNull": true,
160+
"autoincrement": false
161+
}
162+
},
163+
"indexes": {},
164+
"foreignKeys": {
165+
"contributor_repository_relation_contributor_id_contributors_id_fk": {
166+
"name": "contributor_repository_relation_contributor_id_contributors_id_fk",
167+
"tableFrom": "contributor_repository_relation",
168+
"tableTo": "contributors",
169+
"columnsFrom": [
170+
"contributor_id"
171+
],
172+
"columnsTo": [
173+
"id"
174+
],
175+
"onDelete": "no action",
176+
"onUpdate": "no action"
177+
},
178+
"contributor_repository_relation_repository_id_repositories_id_fk": {
179+
"name": "contributor_repository_relation_repository_id_repositories_id_fk",
180+
"tableFrom": "contributor_repository_relation",
181+
"tableTo": "repositories",
182+
"columnsFrom": [
183+
"repository_id"
184+
],
185+
"columnsTo": [
186+
"id"
187+
],
188+
"onDelete": "no action",
189+
"onUpdate": "no action"
190+
}
191+
},
192+
"compositePrimaryKeys": {
193+
"contributor_repository_relation_pk": {
194+
"columns": [
195+
"contributor_id",
196+
"repository_id"
197+
],
198+
"name": "contributor_repository_relation_pk"
199+
}
200+
},
201+
"uniqueConstraints": {}
202+
},
112203
"contributors": {
113204
"name": "contributors",
114205
"columns": {
@@ -167,7 +258,9 @@
167258
"indexes": {
168259
"contributors_url_unique": {
169260
"name": "contributors_url_unique",
170-
"columns": ["url"],
261+
"columns": [
262+
"url"
263+
],
171264
"isUnique": true
172265
}
173266
},
@@ -219,7 +312,9 @@
219312
"indexes": {
220313
"projects_slug_unique": {
221314
"name": "projects_slug_unique",
222-
"columns": ["slug"],
315+
"columns": [
316+
"slug"
317+
],
223318
"isUnique": true
224319
}
225320
},
@@ -280,12 +375,23 @@
280375
"primaryKey": false,
281376
"notNull": true,
282377
"autoincrement": false
378+
},
379+
"stars": {
380+
"name": "stars",
381+
"type": "integer",
382+
"primaryKey": false,
383+
"notNull": true,
384+
"autoincrement": false
283385
}
284386
},
285387
"indexes": {
286388
"repositories_provider_owner_name_unique": {
287389
"name": "repositories_provider_owner_name_unique",
288-
"columns": ["provider", "owner", "name"],
390+
"columns": [
391+
"provider",
392+
"owner",
393+
"name"
394+
],
289395
"isUnique": true
290396
}
291397
},
@@ -294,8 +400,12 @@
294400
"name": "repositories_project_id_projects_id_fk",
295401
"tableFrom": "repositories",
296402
"tableTo": "projects",
297-
"columnsFrom": ["project_id"],
298-
"columnsTo": ["id"],
403+
"columnsFrom": [
404+
"project_id"
405+
],
406+
"columnsTo": [
407+
"id"
408+
],
299409
"onDelete": "no action",
300410
"onUpdate": "no action"
301411
}
@@ -313,4 +423,4 @@
313423
"internal": {
314424
"indexes": {}
315425
}
316-
}
426+
}

0 commit comments

Comments
 (0)