diff --git a/.changeset/long-stars-tie.md b/.changeset/long-stars-tie.md new file mode 100644 index 00000000..5db8fbdc --- /dev/null +++ b/.changeset/long-stars-tie.md @@ -0,0 +1,5 @@ +--- +"changesets-gitlab": patch +--- + +fix: encode `username` in URL diff --git a/src/main.ts b/src/main.ts index e830b720..5eabf022 100644 --- a/src/main.ts +++ b/src/main.ts @@ -42,7 +42,7 @@ export const main = async ({ 'remote', 'set-url', 'origin', - `${url.protocol}//${username}:${GITLAB_TOKEN}@${ + `${url.protocol}//${encodeURIComponent(username)}:${GITLAB_TOKEN}@${ url.host }${url.pathname.replace(/\/$/, '')}/${env.CI_PROJECT_PATH}.git`, ],