Skip to content

Commit

Permalink
Merge pull request #605 from dzcode-io/project-detail
Browse files Browse the repository at this point in the history
feat: Project detail page
  • Loading branch information
ZibanPirate authored Sep 30, 2024
2 parents b9d817a + 651ce39 commit a7c6a52
Show file tree
Hide file tree
Showing 60 changed files with 6,440 additions and 4,906 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/cd.deploy.stg.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,8 @@ jobs:
run: npx lerna run bundle:alone --scope @dzcode.io/web
- name: "Sentry Release"
run: npm run generate:sentry-release $DEPLOY_VERSION stage ${{ secrets.SENTRY_AUTH_TOKEN }}
- name: "Pre-deploy"
run: npm run pre-deploy
- name: "Deploy"
run: npm run deploy:stg

Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/cd.deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,8 @@ jobs:
run: npx lerna run bundle:alone --scope @dzcode.io/web
- name: "Sentry Release"
run: npm run generate:sentry-release $DEPLOY_VERSION production ${{ secrets.SENTRY_AUTH_TOKEN }}
- name: "Pre-deploy"
run: npm run pre-deploy
- name: "Deploy"
run: npm run deploy

Expand Down
6 changes: 4 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,11 @@ build
src/_e2e-test/downloads
src/_e2e-test/videos
src/_e2e-test/screenshots
cloudflare/public
**/cloudflare/public
cloudflare/public/*
**/cloudflare/public/*
**.lighthouseci
.wrangler
**/cloudflare/wrangler.toml

# mobile
mobile/.expo
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,17 @@ CREATE TABLE `contributions` (
FOREIGN KEY (`contributor_id`) REFERENCES `contributors`(`id`) ON UPDATE no action ON DELETE no action
);
--> statement-breakpoint
CREATE TABLE `contributor_repository_relation` (
`contributor_id` integer NOT NULL,
`repository_id` integer NOT NULL,
`record_imported_at` text DEFAULT CURRENT_TIMESTAMP NOT NULL,
`run_id` text DEFAULT 'initial-run-id' NOT NULL,
`score` integer NOT NULL,
PRIMARY KEY(`contributor_id`, `repository_id`),
FOREIGN KEY (`contributor_id`) REFERENCES `contributors`(`id`) ON UPDATE no action ON DELETE no action,
FOREIGN KEY (`repository_id`) REFERENCES `repositories`(`id`) ON UPDATE no action ON DELETE no action
);
--> statement-breakpoint
CREATE TABLE `contributors` (
`id` integer PRIMARY KEY AUTOINCREMENT NOT NULL,
`record_imported_at` text DEFAULT CURRENT_TIMESTAMP NOT NULL,
Expand All @@ -39,6 +50,7 @@ CREATE TABLE `repositories` (
`name` text NOT NULL,
`run_id` text DEFAULT 'initial-run-id' NOT NULL,
`project_id` integer NOT NULL,
`stars` integer NOT NULL,
FOREIGN KEY (`project_id`) REFERENCES `projects`(`id`) ON UPDATE no action ON DELETE no action
);
--> statement-breakpoint
Expand Down
10 changes: 0 additions & 10 deletions api/db/migrations/0001_black_eternals.sql

This file was deleted.

134 changes: 122 additions & 12 deletions api/db/migrations/meta/0000_snapshot.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"version": "6",
"dialect": "sqlite",
"id": "ba41012f-4495-42ff-ace1-61bd7eaef476",
"id": "2fd49a6b-a3d6-4f53-a4f5-ac67492fc5dd",
"prevId": "00000000-0000-0000-0000-000000000000",
"tables": {
"contributions": {
Expand Down Expand Up @@ -82,7 +82,9 @@
"indexes": {
"contributions_url_unique": {
"name": "contributions_url_unique",
"columns": ["url"],
"columns": [
"url"
],
"isUnique": true
}
},
Expand All @@ -91,24 +93,113 @@
"name": "contributions_repository_id_repositories_id_fk",
"tableFrom": "contributions",
"tableTo": "repositories",
"columnsFrom": ["repository_id"],
"columnsTo": ["id"],
"columnsFrom": [
"repository_id"
],
"columnsTo": [
"id"
],
"onDelete": "no action",
"onUpdate": "no action"
},
"contributions_contributor_id_contributors_id_fk": {
"name": "contributions_contributor_id_contributors_id_fk",
"tableFrom": "contributions",
"tableTo": "contributors",
"columnsFrom": ["contributor_id"],
"columnsTo": ["id"],
"columnsFrom": [
"contributor_id"
],
"columnsTo": [
"id"
],
"onDelete": "no action",
"onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
"uniqueConstraints": {}
},
"contributor_repository_relation": {
"name": "contributor_repository_relation",
"columns": {
"contributor_id": {
"name": "contributor_id",
"type": "integer",
"primaryKey": false,
"notNull": true,
"autoincrement": false
},
"repository_id": {
"name": "repository_id",
"type": "integer",
"primaryKey": false,
"notNull": true,
"autoincrement": false
},
"record_imported_at": {
"name": "record_imported_at",
"type": "text",
"primaryKey": false,
"notNull": true,
"autoincrement": false,
"default": "CURRENT_TIMESTAMP"
},
"run_id": {
"name": "run_id",
"type": "text",
"primaryKey": false,
"notNull": true,
"autoincrement": false,
"default": "'initial-run-id'"
},
"score": {
"name": "score",
"type": "integer",
"primaryKey": false,
"notNull": true,
"autoincrement": false
}
},
"indexes": {},
"foreignKeys": {
"contributor_repository_relation_contributor_id_contributors_id_fk": {
"name": "contributor_repository_relation_contributor_id_contributors_id_fk",
"tableFrom": "contributor_repository_relation",
"tableTo": "contributors",
"columnsFrom": [
"contributor_id"
],
"columnsTo": [
"id"
],
"onDelete": "no action",
"onUpdate": "no action"
},
"contributor_repository_relation_repository_id_repositories_id_fk": {
"name": "contributor_repository_relation_repository_id_repositories_id_fk",
"tableFrom": "contributor_repository_relation",
"tableTo": "repositories",
"columnsFrom": [
"repository_id"
],
"columnsTo": [
"id"
],
"onDelete": "no action",
"onUpdate": "no action"
}
},
"compositePrimaryKeys": {
"contributor_repository_relation_pk": {
"columns": [
"contributor_id",
"repository_id"
],
"name": "contributor_repository_relation_pk"
}
},
"uniqueConstraints": {}
},
"contributors": {
"name": "contributors",
"columns": {
Expand Down Expand Up @@ -167,7 +258,9 @@
"indexes": {
"contributors_url_unique": {
"name": "contributors_url_unique",
"columns": ["url"],
"columns": [
"url"
],
"isUnique": true
}
},
Expand Down Expand Up @@ -219,7 +312,9 @@
"indexes": {
"projects_slug_unique": {
"name": "projects_slug_unique",
"columns": ["slug"],
"columns": [
"slug"
],
"isUnique": true
}
},
Expand Down Expand Up @@ -280,12 +375,23 @@
"primaryKey": false,
"notNull": true,
"autoincrement": false
},
"stars": {
"name": "stars",
"type": "integer",
"primaryKey": false,
"notNull": true,
"autoincrement": false
}
},
"indexes": {
"repositories_provider_owner_name_unique": {
"name": "repositories_provider_owner_name_unique",
"columns": ["provider", "owner", "name"],
"columns": [
"provider",
"owner",
"name"
],
"isUnique": true
}
},
Expand All @@ -294,8 +400,12 @@
"name": "repositories_project_id_projects_id_fk",
"tableFrom": "repositories",
"tableTo": "projects",
"columnsFrom": ["project_id"],
"columnsTo": ["id"],
"columnsFrom": [
"project_id"
],
"columnsTo": [
"id"
],
"onDelete": "no action",
"onUpdate": "no action"
}
Expand All @@ -313,4 +423,4 @@
"internal": {
"indexes": {}
}
}
}
Loading

0 comments on commit a7c6a52

Please sign in to comment.