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(api): Add feature to fork projects #239

Merged
merged 3 commits into from
May 24, 2024
Merged

Conversation

rajdip-b
Copy link
Member

Description

Fixes #187

Endpoints added:

  • POST /api/project/:projectId/fork -> Creates a fork of the project
  • GET /api/project/:projectId/forks -> Gets all the forks for that project
  • DELETE /api/project/:projectId/unlink-fork -> Removes the fork relationship for this project
  • PUT /api/project/:projectId/sync-fork -> Syncs the fork with the parent project

Copy link
Contributor

Failed to generate code suggestions for PR

@@ -18,8 +17,9 @@
"db:reset": "pnpx dotenv-cli -e ../../.env -- pnpm dlx prisma migrate reset --force --schema=src/prisma/schema.prisma",
"sourcemaps": "sentry-cli sourcemaps inject ./dist && sentry-cli sourcemaps upload ./dist || echo 'Failed to upload source maps to Sentry'",
"e2e:prepare": "cd ../../ && docker compose down && docker compose -f docker-compose-test.yml up -d && cd apps/api && pnpm db:generate-types && cross-env NODE_ENV='e2e' DATABASE_URL='postgresql://prisma:prisma@localhost:5432/tests' pnpm run db:deploy-migrations",
"e2e": "pnpm run e2e:prepare && cross-env NODE_ENV='e2e' DATABASE_URL='postgresql://prisma:prisma@localhost:5432/tests' turbo run test --no-cache --filter=api -- --runInBand --config=jest.e2e-config.ts --coverage --coverageDirectory=../../coverage-e2e/api --coverageReporters=json && pnpm run e2e:teardown",
"e2e:teardown": "cd ../../ && docker compose -f docker-compose-test.yml down"
"e2e": "pnpm run e2e:prepare && cross-env NODE_ENV='e2e' DATABASE_URL='postgresql://prisma:prisma@localhost:5432/tests' jest --runInBand --config=jest.e2e-config.ts --coverage --coverageDirectory=../../coverage-e2e/api --coverageReporters=json && pnpm run e2e:teardown",

Check failure

Code scanning / SonarCloud

PostgreSQL database passwords should not be disclosed

<!--SONAR_ISSUE_KEY:AY-qz8DwYbBhSzyuK0B9-->Make sure this PostgreSQL database password gets changed and removed from the code. <p>See more on <a href="https://sonarcloud.io/project/issues?id=keyshade-xyz_keyshade&issues=AY-qz8DwYbBhSzyuK0B9&open=AY-qz8DwYbBhSzyuK0B9&pullRequest=239">SonarCloud</a></p>
@rajdip-b
Copy link
Member Author

/review

@rajdip-b rajdip-b force-pushed the feat/fork-public-project branch from 015b3fb to e9664f2 Compare May 24, 2024 13:41
Copy link

Quality Gate Passed Quality Gate passed

Issues
2 New issues
1 Accepted issue

Measures
0 Security Hotspots
No data about Coverage
16.2% Duplication on New Code

See analysis details on SonarCloud

@rajdip-b
Copy link
Member Author

/review

Copy link

codecov bot commented May 24, 2024

Codecov Report

Attention: Patch coverage is 95.00000% with 8 lines in your changes are missing coverage. Please review.

Project coverage is 90.45%. Comparing base (ce50743) to head (3ecb5d2).
Report is 4 commits behind head on develop.

Files Patch % Lines
apps/api/src/project/service/project.service.ts 94.02% 8 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop     #239      +/-   ##
===========================================
- Coverage    91.71%   90.45%   -1.26%     
===========================================
  Files          111      113       +2     
  Lines         2510     2714     +204     
  Branches       469      517      +48     
===========================================
+ Hits          2302     2455     +153     
- Misses         208      259      +51     
Flag Coverage Δ
api-e2e-tests 90.45% <95.00%> (-1.26%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@rajdip-b rajdip-b merged commit 3bab653 into develop May 24, 2024
6 of 7 checks passed
@rajdip-b rajdip-b deleted the feat/fork-public-project branch May 24, 2024 13:56
rajdip-b pushed a commit that referenced this pull request May 24, 2024
## [1.4.0](v1.3.0...v1.4.0) (2024-05-24)

### 🚀 Features

* add example for health and email auth ([b834d25](b834d25))
* **api:** Add `minio-client` provider ([#237](#237)) ([cd71c5a](cd71c5a))
* **api:** Add feature to fork projects ([#239](#239)) ([3bab653](3bab653))
* **api:** Added feedback form module ([#210](#210)) ([ae1efd8](ae1efd8))
* **api:** Added Project Level Access  ([#221](#221)) ([564f5ed](564f5ed))
* **api:** Added support for changing email of users ([#233](#233)) ([5ea9a10](5ea9a10))
* implemented auth, ui for most, and fixed cors ([#217](#217)) ([feace86](feace86))
* **platfrom:** add delete method in api client ([#225](#225)) ([55cf09f](55cf09f))
* **postman:** add example for get_self and update_self ([e015acf](e015acf))
* **web:** Add and link privacy and tnc page ([#226](#226)) ([ec81eb9](ec81eb9))

### 🐛 Bug Fixes

* **web:** docker next config not found ([#228](#228)) ([afe3160](afe3160))

### 📚 Documentation

* Added docs regarding postman, and refactored architecture diagrams ([f1c9777](f1c9777))
* Fix typo in organization-of-code.md ([#234](#234)) ([11244a2](11244a2))

### 🔧 Miscellaneous Chores

* **api:** Get feedback forward email from process.env ([#236](#236)) ([204c9d1](204c9d1))
* **postman:** Initialized postman ([bb76384](bb76384))
* **release:** Update changelog config ([af91283](af91283))
* Remove swagger docs ([#220](#220)) ([7640299](7640299))

### 🔨 Code Refactoring

* **api:** Replaced OTP code from alphanumeric to numeric ([#230](#230)) ([f16162a](f16162a))
@rajdip-b
Copy link
Member Author

🎉 This PR is included in version 1.4.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

API: Ability to fork project
1 participant