paulirish / git-open

Type `git open` to open the GitHub page or website for a repository in your browser.
MIT License
3.3k stars 247 forks source link

gitlab: fix issue ID parsing #183

Closed kazufusa closed 2 years ago

kazufusa commented 3 years ago

fixes #182

Hi,

I use this good tool everyday and thank you!

In GitLab, the branch's name is normally the issue ID followed by the hyphenated title, and I've noticed that the issue's titile having numbers is incorrectly handled.

$ git branch
* 10-bump-up-to-v2.0
  main
$ git open -ip
https://gitlab.example.com/user/repo/issues/1020
# I expected https://gitlab.example.com/user/repo/issues/10

I've fixed the issue ID parsing to take the first number in branch name.