mirror of
https://github.com/paulirish/git-open.git
synced 2026-09-10 07:26:15 -04:00
Merge pull request #114 from Jaxwood/master
Fix bug with open -i on default VSTS project repo
This commit is contained in:
commit
d049d441b3
2
git-open
2
git-open
|
|
@ -189,6 +189,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.
|
||||
|
|
|
|||
|
|
@ -496,6 +496,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 ..
|
||||
|
|
|
|||
Loading…
Reference in a new issue