fix: uriencode quotes

This commit is contained in:
2025-11-09 17:40:34 +02:00
parent 8d3a61b636
commit f43244dc02
2 changed files with 3 additions and 2 deletions

View File

@@ -218,8 +218,8 @@ git_open_new_pr() {
default_branch="master"
fi
branch="$(uriencode $(trim $branch))"
default_branch="$(uriencode $(trim $default_branch))"
branch="$(uriencode "$(trim "$branch")")"
default_branch="$(uriencode "$(trim "$default_branch")")"
case "$remote_type" in
github) open_url "$silent" "https://github.com/$repo_path/compare/$default_branch...$branch" ;;

View File

@@ -80,6 +80,7 @@ assert_value "https://github.com/chenasraf/git-open/compare/develop...master" $(
assert_value "https://github.com/chenasraf/git-open/compare/master...develop" $(git_open_new_pr -f develop)
assert_value "https://github.com/chenasraf/git-open/compare/master...$current_branch" $(git_open_new_pr -f)
assert_value "https://github.com/chenasraf/git-open/compare/develop...master" $(git_open_new_pr -f "master " " develop ")
assert_value "https://github.com/chenasraf/git-open/compare/master...feature%2Flong-branch-name" $(git_open_new_pr -f "feature/long-branch-name" "master")
describe "git_open_pipelines"
assert_value "https://github.com/chenasraf/git-open/actions" $(git_open_pipelines)