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

This commit is contained in:
Corentin Huet 2026-08-24 17:50:16 +02:00
parent 10b75031e7
commit 22bc49baab

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]);