Add ticket branch discovery by ticket key
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
<?php
|
||||
|
||||
namespace App\Actions\Git;
|
||||
|
||||
class TicketKeyReferenceMatcher
|
||||
{
|
||||
public function matches(string $ticketKey, string $referenceName): bool
|
||||
{
|
||||
return preg_match(
|
||||
'/^'.preg_quote($ticketKey, '/').'(?=$|[-_\/])/',
|
||||
$referenceName,
|
||||
) === 1;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user