-
Notifications
You must be signed in to change notification settings - Fork 53
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
✨ Updated addProject action to handle repository creation and mapping #903
Conversation
… within a transaction.
…ory pull requests.
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
Updates to Preview Branch (feat/add-record-project-repository-mapping) ↗︎
Tasks are run on every commit but only new migration files are pushed.
View logs for this Workflow Run ↗︎. |
PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|
PR Code Suggestions ✨Explore these optional code suggestions:
|
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.
Confirmed that repository information is added when creating a project!
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.
LGTM👍
const repositoryOwner = formData.get('repositoryOwner') as string | ||
const installationId = formData.get('installationId') as string | ||
|
||
const result = await prisma.$transaction(async (tx) => { |
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.
I see, Prisma's transaction 👀
Issue
Why is this change needed?
At the same time as adding a Project, a record is also added to the ProjectRepositoryMapping.
Additionally, if there is no corresponding record in the Repository table, a record is added to the Repository table as well.
Furthermore, the display section for the migration list that had been commented out as a temporary measure in #901 (comment) has also been fixed.
What would you like reviewers to focus on?
Testing Verification
What was done
🤖 Generated by PR Agent at 4fcb19b
addProject
action to handle repository creation and mapping.ProjectDetailPage
to display migration details.InstallationSelector
to include repository and installation details.Detailed Changes
addProject.ts
Add transaction for project and repository creation
frontend/apps/app/features/projects/actions/addProject.ts
ProjectDetailPage.tsx
Display migration details in ProjectDetailPage
frontend/apps/app/features/projects/pages/ProjectDetailPage/ProjectDetailPage.tsx
getProject
to include migration details from pull requests.InstallationSelector.tsx
Enhance InstallationSelector with repository details
frontend/apps/app/features/projects/pages/ProjectNewPage/InstallationSelector/InstallationSelector.tsx
handleClick
to include repository and installation details.Additional Notes