Merge branch 'trunk'
This commit is contained in:
commit
6cf790feab
2 changed files with 8 additions and 3 deletions
|
|
@ -754,8 +754,13 @@ class TicketController extends Controller
|
|||
{
|
||||
$userGitlabId = auth()->user()->gitlab_id;
|
||||
$gitlabRepoId = $ticket->site->gitlab_project_id;
|
||||
$description = \sprintf("%s<br>", $ticket->text);
|
||||
$cLabel = match ($ticket->type) {
|
||||
|
||||
if (GitLab::projects()->show($gitlabRepoId)['archived']) {
|
||||
return back()->with('error', \trans("Ce projet GitLab est archivé et ne peut pas être utilisé."));
|
||||
}
|
||||
|
||||
$description = \sprintf("%s<br>", $ticket->text);
|
||||
$cLabel = match ($ticket->type) {
|
||||
TicketTypeEnum::bug => 'c-bug,g-to-dispatch',
|
||||
TicketTypeEnum::evolution => 'c-feature',
|
||||
TicketTypeEnum::newsletter => 'c-feature,g-to-estimate',
|
||||
|
|
|
|||
|
|
@ -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]);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue