Skip to content

Commit 0308f98

Browse files
committed
Fix: don't use owner name as source_project_id for cross-repo MRs
sourceProjectIdentifier() was falling back to source.owner (a username/group string) when source.repository was absent. This sent a bogus --raw-field source_project_id=<username> to the GitLab API, which expects a numeric project ID. Only use source.repository (a proper path_with_namespace) for the source_project_id parameter; when only an owner is known, omit it entirely and let the endpoint default to the current project.
1 parent bee3900 commit 0308f98

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

apps/server/src/sourceControl/GitLabCli.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,7 @@ function sourceRefName(input: {
206206
}
207207

208208
function sourceProjectIdentifier(source: SourceControlRefSelector | undefined): string | null {
209-
return source?.repository ?? source?.owner ?? null;
209+
return source?.repository ?? null;
210210
}
211211

212212
function toSummaryWithOptionalUpdatedAt(

0 commit comments

Comments
 (0)