Skip to content
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

Merged
merged 44 commits into from
Sep 30, 2024
Merged

feat: Project detail page #605

merged 44 commits into from
Sep 30, 2024

Conversation

ZibanPirate
Copy link
Member

@ZibanPirate ZibanPirate commented Sep 22, 2024

  • revamped projects listing page
  • added new project detail page

see #607

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (changes that require a fresh clone of the repo)
  • I'm not sure

@github-actions github-actions bot added data Data related changes ( data folder ) web Web related changes ( web folder ) api API related changes ( api folder ) labels Sep 22, 2024
api/src/app/middlewares/security.ts Outdated Show resolved Hide resolved
api/src/project/repository.ts Show resolved Hide resolved
Base automatically changed from cloudflare-redirect to main September 22, 2024 19:20
@github-actions github-actions bot added models models package utils utils package labels Sep 23, 2024
@github-actions github-actions bot added the repo label Sep 28, 2024
@@ -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
Copy link
Member

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?

Copy link
Member Author

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.

Copy link
Member

@omdxp omdxp Sep 30, 2024

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

Copy link
Member Author

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 👌

Copy link
Member

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?

Copy link
Member Author

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

Copy link
Member

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

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same here?

Copy link
Member Author

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",
Copy link
Member

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?

Copy link
Member Author

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

@ZibanPirate ZibanPirate merged commit a7c6a52 into main Sep 30, 2024
23 checks passed
@ZibanPirate ZibanPirate deleted the project-detail branch September 30, 2024 19:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api API related changes ( api folder ) data Data related changes ( data folder ) feature Feature models models package repo utils utils package web Web related changes ( web folder )
Projects
Status: Merged
Development

Successfully merging this pull request may close these issues.

2 participants