open-build-service
open-build-service copied to clipboard
Regexp for Github issue tracker does not work always
Hi there!
Today, while working on https://github.com/openSUSE/packaging_rake_tasks/pull/54, I realize that the Github regexp does not work for most of the YaST repositories, which contain at least one hyphen.
https://github.com/openSUSE/open-build-service/blob/f362d50232018a81f27af98cd309f16a73332cb7/src/api/db/seeds.rb#L326-L330
After taking a look here and there, I ended fixing it on our side (see https://github.com/openSUSE/packaging_rake_tasks/pull/55) using a slightly complicated regexp.
/(?:gh|github)#([a-z\d](?:[a-z\d]|-(?=[a-z\d])){0,38}\/[\w.-]+#\d+)/i
which seems to work :wink:
Related to https://github.com/openSUSE/open-build-service/pull/6875