Rename RemoteBranchData -> BranchData

This commit is contained in:
Caleb Owens 2024-07-16 11:59:15 +02:00
parent 4d5ff2f888
commit f8261130dc
No known key found for this signature in database
2 changed files with 5 additions and 5 deletions

View File

@ -1,5 +1,5 @@
import { invoke } from '$lib/backend/ipc';
import { Branch, RemoteBranchData } from '$lib/vbranches/types';
import { Branch, BranchData } from '$lib/vbranches/types';
import { plainToInstance } from 'class-transformer';
import { writable } from 'svelte/store';
import type { ProjectMetrics } from '$lib/metrics/projectMetrics';
@ -28,9 +28,9 @@ export class RemoteBranchService {
}
}
async getRemoteBranchData(refname: string): Promise<RemoteBranchData> {
async getRemoteBranchData(refname: string): Promise<BranchData> {
return plainToInstance(
RemoteBranchData,
BranchData,
await invoke<any>('get_remote_branch_data', { projectId: this.projectId, refname })
);
}

View File

@ -111,7 +111,7 @@ export class VirtualBranch {
order!: number;
@Type(() => Branch)
upstream?: Branch;
upstreamData?: RemoteBranchData;
upstreamData?: BranchData;
upstreamName?: string;
conflicted!: boolean;
// TODO: to be removed from the API
@ -336,7 +336,7 @@ export class Branch {
}
}
export class RemoteBranchData {
export class BranchData {
sha!: string;
name!: string;
upstream?: string;