Merge branch '127-error-sentry' into 'develop'

fix: 🐛 update regex to match both issue and work items

See merge request ldc-web/projets/support-web!134
This commit is contained in:
Karl M'muller 2026-08-26 10:57:57 +00:00
commit d9d1fea624

View file

@ -17,7 +17,7 @@ trait HasGitlabIssue
*/
public function getGitlabIssue(int $projectId, string $issueUrl): array
{
if (!preg_match('/\/issues\/(\d+)/', $issueUrl, $matches)) { return []; }
if (!preg_match('/\/(?:issues|work_items)\/(\d+)/', $issueUrl, $matches)) { return []; }
$gitlabIssue = GitLab::issues()->show($projectId, (int) $matches[1]);