Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions git-open
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,8 @@ elif [[ "${#pathargs[@]}" -ge '2' && ${pathargs[${#pathargs[@]} - 2]} == '_git'
if (( is_issue )); then
# Switch to workitems, provide work item id if specified
urlpath="${urlpath%%/_git/*}/_workitems"
# Handle case for the default repository url
urlpath="${urlpath#_git\/*}"
providerBranchRef="?id=${branch//[^0-9]/}"
else
# Keep project and repository name, append branch selector.
Expand Down
7 changes: 7 additions & 0 deletions test/git-open.bats
Original file line number Diff line number Diff line change
Expand Up @@ -361,6 +361,13 @@ setup() {
assert_output "http://tfs.example.com:8080/Project/Folder/_workitems?id=36"
}

@test "vsts: default project repository - issue" {
git remote set-url origin "https://gitopen.visualstudio.com/_git/Project"
git checkout -B "bugfix-36"
run ../git-open "--issue"
assert_output "https://gitopen.visualstudio.com/Project/_workitems?id=36"
}


teardown() {
cd ..
Expand Down