Skip to content

Commit 9ab4bb0

Browse files
authored
fix: encode username in URL (#223)
1 parent 85b28f7 commit 9ab4bb0

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

.changeset/long-stars-tie.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: encode `username` in URL

src/main.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ export const main = async ({
4242
'remote',
4343
'set-url',
4444
'origin',
45-
`${url.protocol}//${username}:${GITLAB_TOKEN}@${
45+
`${url.protocol}//${encodeURIComponent(username)}:${GITLAB_TOKEN}@${
4646
url.host
4747
}${url.pathname.replace(/\/$/, '')}/${env.CI_PROJECT_PATH}.git`,
4848
],

0 commit comments

Comments
 (0)