action #178771
Updated by tinita about 1 month ago
## Motivation
The code for bugrefs can be improved.
The urls are currently hardcoded.
There is code that handles some exceptions for certain bugtrackers:
https://github.com/os-autoinst/openQA/blob/master/lib/OpenQA/Utils.pm#L459-L460
```
my $issuetext = $+{marker} eq 'pio' ? 'issue' : 'issues';
return $BUGREFS{$+{marker}} . ($+{repo} ? "$+{repo}/$issuetext/" : '') . $+{id};
```
There is a regex that tries to make it work for all bugtrackers but this is hard to understand by now:
https://github.com/os-autoinst/openQA/blob/master/lib/OpenQA/Utils.pm#L477
```
$regex = qr{(?<!["\(\[])(?<url_root>$regex)((?<repo>.*?)/(-/)?(issues?|pull)/)?(?<id>([A-Z]+-)?\d+)(?![\w])};
```
We have extra code for matching `recognized_referers` that needs to be improved to only match links to issues.
We should not invent a second list or mapping, if we are basically talking about the same urls. The configured bugtrackers are usually the same urls that you would want for referer matching.
This would block or replace #176826