Skip to content

Commit c3bd177

Browse files
committed
fix(gitlab): preserve slashes in branch ref for file source URLs (GitFlow branches)
1 parent 46b7c0e commit c3bd177

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

apps/sim/connectors/gitlab/gitlab.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -271,7 +271,8 @@ function buildFileSourceUrl(
271271
): string {
272272
const encodedPath = path.split('/').map(encodeURIComponent).join('/')
273273
if (projectPath) {
274-
return `https://${host}/${projectPath}/-/blob/${encodeURIComponent(ref)}/${encodedPath}`
274+
const encodedRef = ref.split('/').map(encodeURIComponent).join('/')
275+
return `https://${host}/${projectPath}/-/blob/${encodedRef}/${encodedPath}`
275276
}
276277
return `${apiBase}/projects/${encodedProject}/repository/files/${encodeURIComponent(path)}/raw?ref=${encodeURIComponent(ref)}`
277278
}

0 commit comments

Comments
 (0)