Skip to content

Commit f35cd64

Browse files
authored
fix: add the path to the origin url (#120)
1 parent fa0fd67 commit f35cd64

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

.changeset/three-eels-boil.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'changesets-gitlab': patch
3+
---
4+
5+
Fix issue when the release MRs could not be created when gitlab is not hosted at the root of the of the domain (https://www.company.com/gitlab).

src/main.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ MainCommandOptions = {}) => {
4848
'origin',
4949
`${url.protocol}//${username}:${GITLAB_TOKEN!}@${
5050
url.host
51-
}/${CI_PROJECT_PATH!}.git`,
51+
}${url.pathname.replace(/\/$/, '')}/${CI_PROJECT_PATH!}.git`,
5252
],
5353
{ silent: !['true', '1'].includes(DEBUG_GITLAB_CREDENTIAL) },
5454
)

0 commit comments

Comments
 (0)