feat(FN-3724): add split-button for git pull with rebase option
The merge adds a pull split-button in the GitManager modal that lets users choose between a regular `git pull` and a `git pull --rebase`, with styling and test coverage for the menu interactions and API payload. It also fixes plugin toggle rendering (FN-3723) and adds a release note for plugin insta Fusion-Task-Id: FN-3724
This commit is contained in:
@@ -2358,9 +2358,18 @@ export function fetchRemote(remote?: string, projectId?: string): Promise<GitFet
|
||||
}
|
||||
|
||||
/** Pull current branch */
|
||||
export function pullBranch(projectId?: string): Promise<GitPullResult> {
|
||||
return api<GitPullResult>(withProjectId("/git/pull", projectId), {
|
||||
export function pullBranch(options?: { rebase?: boolean }, projectId?: string): Promise<GitPullResult>;
|
||||
export function pullBranch(projectId?: string): Promise<GitPullResult>;
|
||||
export function pullBranch(
|
||||
optionsOrProjectId?: { rebase?: boolean } | string,
|
||||
projectId?: string,
|
||||
): Promise<GitPullResult> {
|
||||
const options = typeof optionsOrProjectId === "string" ? undefined : optionsOrProjectId;
|
||||
const resolvedProjectId = typeof optionsOrProjectId === "string" ? optionsOrProjectId : projectId;
|
||||
|
||||
return api<GitPullResult>(withProjectId("/git/pull", resolvedProjectId), {
|
||||
method: "POST",
|
||||
body: JSON.stringify({ rebase: options?.rebase ?? false }),
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user