Skip to content

Commit cd9fda5

Browse files
author
Gavin Williams
committed
Fix repoName calculation for Gitlab MRs
1 parent 457104e commit cd9fda5

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

packages/web/src/features/agents/review-agent/nodes/gitlabMrParser.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,9 @@ export const gitlabMrParser = async (
3030
throw error;
3131
}
3232

33-
const namespace = mrPayload.project.path_with_namespace.split('/').slice(0, -1).join('/');
34-
const repoName = mrPayload.project.name;
33+
const pathParts = mrPayload.project.path_with_namespace.split('/');
34+
const namespace = pathParts.slice(0, -1).join('/');
35+
const repoName = pathParts[pathParts.length - 1];
3536

3637
const sourcebotFileDiffs: (sourcebot_file_diff | null)[] = fileDiffs.map((fileDiff) => {
3738
const fromPath = fileDiff.old_path as string;

0 commit comments

Comments
 (0)