-
Notifications
You must be signed in to change notification settings - Fork 2.2k
fix: new git credential flow #9553
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
base: develop
Are you sure you want to change the base?
Conversation
✅ Circular References ReportGenerated at: 2026-01-09T09:16:07.955Z Summary
Click to view all circular references in PR (167)Click to view all circular references in base branch (167)Analysis✅ No Change: This PR does not introduce or remove any circular references. This report was generated automatically by comparing against the |
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.
Pull request overview
This pull request fixes the new git credentials flow by adapting the UI and data handling for a new credential model where credentials are stored as separate entities and referenced by ID, rather than being embedded in git repository objects.
- Refactors conditional logic to hide git repository selection UI when converting to git storage type if the
isGitSyncEnabledfeature flag is disabled - Simplifies credential cleanup logic on logout to use the new
credentialsIdreference model instead of checking embedded credential fields
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| packages/insomnia/src/ui/components/project/project-settings-form.tsx | Extracts conditional logic into named variables and adds feature flag check to control git repo form visibility during storage type conversion |
| packages/insomnia/src/account/session.ts | Simplifies git repository removal logic to check for credentialsId reference instead of validating embedded credential token/password fields |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| const showGitRepoForm = | ||
| storageType === 'git' && | ||
| ((isGitSyncEnabled && isSwitchingStorageType(project!, storageType)) || | ||
| (!isSwitchingStorageType(project!, storageType) && project?.gitRepositoryId === EMPTY_GIT_PROJECT_ID)); |
Copilot
AI
Jan 9, 2026
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.
The logic for showGitRepoForm doesn't handle the case where an existing git project (not switching storage type, has a non-empty gitRepositoryId) is missing credentials. In the previous implementation, this case would show the GitRepoForm to allow users to add credentials. Now, neither GitConnectionInfo nor GitRepoForm will be displayed, leaving users unable to configure credentials for the existing git repository. Consider adding a condition to show GitRepoForm when !isSwitchingStorageType && gitRepositoryId !== EMPTY_GIT_PROJECT_ID && !gitRepository?.credentialsId.
| (!isSwitchingStorageType(project!, storageType) && project?.gitRepositoryId === EMPTY_GIT_PROJECT_ID)); | |
| (!isSwitchingStorageType(project!, storageType) && project?.gitRepositoryId === EMPTY_GIT_PROJECT_ID) || | |
| (!isSwitchingStorageType(project!, storageType) && project?.gitRepositoryId !== EMPTY_GIT_PROJECT_ID && !gitRepository?.credentialsId)); |
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.
Pull request overview
Copilot reviewed 2 out of 2 changed files in this pull request and generated no new comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Fix for the new git credentials flow #9513