feat(git): add token authentication and credential discovery
Add support for token-based git authentication in identity profiles. Enable discovery and import of credentials from ~/.git-credentials file. Introduce remote URL-based filtering for token identities in git view.
This commit is contained in:
@@ -168,16 +168,25 @@ export interface GitPullResult {
|
||||
deletions: number;
|
||||
}
|
||||
|
||||
export type GitIdentityAuthType = 'ssh' | 'token';
|
||||
|
||||
export interface GitIdentityProfile {
|
||||
id: string;
|
||||
name: string;
|
||||
userName: string;
|
||||
userEmail: string;
|
||||
authType?: GitIdentityAuthType;
|
||||
sshKey?: string | null;
|
||||
host?: string | null;
|
||||
color?: string | null;
|
||||
icon?: string | null;
|
||||
}
|
||||
|
||||
export interface DiscoveredGitCredential {
|
||||
host: string;
|
||||
username: string;
|
||||
}
|
||||
|
||||
export interface GitIdentitySummary {
|
||||
userName: string | null;
|
||||
userEmail: string | null;
|
||||
@@ -290,6 +299,9 @@ export interface GitAPI {
|
||||
createGitIdentity(profile: GitIdentityProfile): Promise<GitIdentityProfile>;
|
||||
updateGitIdentity(id: string, updates: GitIdentityProfile): Promise<GitIdentityProfile>;
|
||||
deleteGitIdentity(id: string): Promise<void>;
|
||||
discoverGitCredentials?(): Promise<DiscoveredGitCredential[]>;
|
||||
getGlobalGitIdentity?(): Promise<GitIdentitySummary | null>;
|
||||
getRemoteUrl?(directory: string, remote?: string): Promise<string | null>;
|
||||
}
|
||||
|
||||
export interface FileListEntry {
|
||||
|
||||
Reference in New Issue
Block a user