Projects STRLCPY git-open Commits 8ac94bf7
🤬
  • ■ ■ ■ ■ ■
    git-open
    skipped 176 lines
    177 177   
    178 178  if (( is_issue )); then
    179 179   # For issues, take the numbers and preprend 'issues/'
    180  - providerBranchRef="/issues/${remote_ref//[^0-9]/}"
     180 + [[ $remote_ref =~ [0-9]+ ]]
     181 + providerBranchRef="/issues/${BASH_REMATCH[0]}"
    181 182  else
    182 183   # Make # and % characters url friendly
    183 184   # github.com/paulirish/git-open/pull/24
    skipped 94 lines
  • ■ ■ ■ ■ ■ ■
    test/git-open.bats
    skipped 521 lines
    522 522   assert_output "https://git.example.com:7000/XXX/YYY"
    523 523  }
    524 524   
     525 +@test "gitlab: issue" {
     526 + git remote set-url origin "[email protected]:user/repo"
     527 + git checkout -B "10-bump-up-to-v2.0"
     528 + run ../git-open "--issue"
     529 + assert_output "https://gitlab.example.com/user/repo/issues/10"
     530 +}
     531 + 
    525 532  ##
    526 533  ## Visual Studio Team Services
    527 534  ##
    skipped 175 lines
Please wait...
Page is in error, reload to recover