feat(git): select commit email from git provider per repo [INS-1474]#9593
feat(git): select commit email from git provider per repo [INS-1474]#9593ryan-willis merged 2 commits intodevelopfrom
Conversation
✅ Circular References ReportGenerated at: 2026-01-27T01:07:49.462Z Summary
Click to view all circular references in PR (85)Click to view all circular references in base branch (85)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.
Pull request overview
This PR adds the ability for users to override the default author email address used in Git commits on a per-repository basis, allowing different email addresses for different projects while using the same Git provider credential. Additionally, it updates the credential list UI in preferences to improve visual distinction between credential rows.
Changes:
- Adds
selectedAuthorEmailfield to git repository model and project data interfaces to store per-repo email overrides - Implements email selector UI in project settings and git repo forms for OAuth credentials (GitHub/GitLab) with multiple emails
- Updates GitLab provider to enable email fetching (changed
supportsFetchEmailstotrue) with caching support for repositories - Creates new route and IPC handler for fetching provider emails dynamically
Reviewed changes
Copilot reviewed 20 out of 20 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| packages/insomnia/src/models/git-repository.ts | Adds selectedAuthorEmail field to git repository model |
| packages/insomnia/src/ui/components/project/utils.tsx | Adds selectedAuthorEmail to ProjectData interface |
| packages/insomnia/src/ui/components/project/project-settings-form.tsx | Implements email selector dropdown for OAuth credentials with dynamic fetching and loading states |
| packages/insomnia/src/ui/components/project/git-repo-form.tsx | Adds email selector to git repo setup form and removes email display from credential selector |
| packages/insomnia/src/ui/components/modals/git-repository-settings-modal/git-repository-settings-modal.tsx | Displays selected or default author email in repository settings modal |
| packages/insomnia/src/ui/components/settings/credentials.tsx | Updates credential list layout from grid to flex with bordered cards for better visual separation |
| packages/insomnia/src/ui/components/git-credentials/git-repository-select.tsx | Adds ref-based caching to prevent unnecessary re-fetching of repositories |
| packages/insomnia/src/sync/git/utils.ts | Updates author retrieval to use selectedAuthorEmail override when available |
| packages/insomnia/src/sync/git/providers/types.ts | Adds supportsFetchEmails field to GitProviderOption interface |
| packages/insomnia/src/sync/git/providers/registry.ts | Propagates supportsFetchEmails from providers to registry |
| packages/insomnia/src/sync/git/providers/gitlab.ts | Enables email fetching, refactors email methods, adds repository caching, and stores emails during OAuth |
| packages/insomnia/src/sync/git/providers/github.ts | Stores emails in credentials during OAuth completion |
| packages/insomnia/src/main/git-service.ts | Implements email fetching endpoint, updates clone/update actions to handle selectedAuthorEmail, adds setAuthor calls before commits |
| packages/insomnia/src/routes/git-provider.emails.tsx | New route for fetching available emails from git providers |
| packages/insomnia/src/routes/organization.$organizationId.project.new.tsx | Passes selectedAuthorEmail when creating new projects |
| packages/insomnia/src/routes/organization.$organizationId.project.$projectId.update.tsx | Adds logic to update git repository settings including email override |
| packages/insomnia/src/routes/git.update.tsx | Adds selectedAuthorEmail to UpdateGitRepoData interface |
| packages/insomnia/src/routes/git.clone.tsx | Adds selectedAuthorEmail to CloneGitRepoData interface |
| packages/insomnia/src/main/ipc/electron.ts | Registers new IPC channel for fetching provider emails |
| packages/insomnia/src/entry.preload.ts | Exposes getGitProviderEmails API to renderer process |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| }, | ||
| }); | ||
| const userData = await this.fetchUserWithToken(credential.credentials?.token); | ||
|
|
There was a problem hiding this comment.
The token for Gitlab may have expired when this function is called.
Github does not have same issue because Github token does not expire.
2442242 to
b300588
Compare
b300588 to
31cea55
Compare
Uh oh!
There was an error while loading. Please reload this page.