-
Notifications
You must be signed in to change notification settings - Fork 41
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: Project detail page #605
Conversation
380b361
to
f822f33
Compare
f1b21e6
to
651ce39
Compare
@@ -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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we add a readme column here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what for? if for showing it in the project detail page, it will require more effort, we need to:
- fetch the readme file and save it in the db in the crown job.
- update the UI, and account for multiple repos case.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
how about we fetch the readme file from backend and we static generate the readme section in project details? no need to save it in db
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
that's another way of doing it, thoe we will rich the Github rate-limit which is the reason why we had to switch to the cron-job, feel free to explore how we implement this in a separate task, but for now this will do 👌
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why this migration file was deleted?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
two reasons:
- SQLite doesn't support altering tables, we may need to switch to another db engine later.
- our data is refreshed on every cron job run, deleting the database and starting over is not a problem
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it'd be better to have versioning in db structure that relates to the api version (some people might only need the api), that's why it is better to keep migrations
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same reason mentioned here:
#605 (comment)
@@ -9,6 +9,7 @@ | |||
"@types/node": "^20", | |||
"@types/semver": "^7.3.9", | |||
"cross-env": "^7.0.3", | |||
"del-cli": "^5.1.0", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what's the benefit of using this instead of rimraf?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
for security reasons, rimraf doesn't support glob pattern when ran via cli (to not delete the entire system), del-cli does support it
see #607
Type of change