Skip to content

Commit a37d899

Browse files
authored
Merge pull request #8523 from gitbutlerapp/fix-gitlab-stuff
Fix some broken GitLab stuff
2 parents 456f813 + 935fd66 commit a37d899

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

apps/desktop/src/components/ReviewCreation.svelte

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
import { ButRequestDetailsService } from '$lib/forge/butRequestDetailsService';
1818
import { DefaultForgeFactory } from '$lib/forge/forgeFactory.svelte';
1919
import { mapErrorToToast } from '$lib/forge/github/errorMap';
20+
import { GitHubPrService } from '$lib/forge/github/githubPrService.svelte';
2021
import { type PullRequest } from '$lib/forge/interface/types';
2122
import { ReactivePRBody, ReactivePRTitle } from '$lib/forge/prContents.svelte';
2223
import {
@@ -292,9 +293,12 @@
292293
293294
const repoInfo = parseRemoteUrl(pushRemoteUrl);
294295
295-
const upstreamName = repoInfo?.owner
296-
? `${repoInfo.owner}:${params.upstreamBranchName}`
297-
: params.upstreamBranchName;
296+
const upstreamName =
297+
prService instanceof GitHubPrService
298+
? repoInfo?.owner
299+
? `${repoInfo.owner}:${params.upstreamBranchName}`
300+
: params.upstreamBranchName
301+
: params.upstreamBranchName;
298302
299303
const pr = await prService.createPr({
300304
title: params.title,

apps/desktop/src/lib/forge/gitlab/gitlabPrService.svelte.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ function injectEndpoints(api: GitLabApi) {
115115
queryFn: async ({ head, base, title, body }, query) => {
116116
const { api, upstreamProjectId, forkProjectId } = gitlab(query.extra);
117117
const upstreamProject = await api.Projects.show(upstreamProjectId);
118-
const mr = await api.MergeRequests.create(forkProjectId, base, head, title, {
118+
const mr = await api.MergeRequests.create(forkProjectId, head, base, title, {
119119
description: body,
120120
targetProjectId: upstreamProject.id,
121121
removeSourceBranch: true

0 commit comments

Comments
 (0)