Merge pull request #114 from Jaxwood/master

Fix bug with open -i on default VSTS project repo
This commit is contained in:
Dave Wikoff 2018-02-21 20:37:32 -05:00 committed by GitHub
commit d049d441b3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 0 deletions

View file

@ -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.

View file

@ -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 ..