Merge branch 'main' into staging

This commit is contained in:
2026-06-24 13:42:59 +02:00
5 changed files with 18 additions and 27 deletions
+1 -8
View File
@@ -3,16 +3,9 @@ name: linter
on:
push:
branches:
- develop
- main
- master
- workos
- staging
pull_request:
branches:
- develop
- main
- master
- workos
permissions:
contents: write
+1 -8
View File
@@ -3,16 +3,9 @@ name: tests
on:
push:
branches:
- develop
- main
- master
- workos
- staging
pull_request:
branches:
- develop
- main
- master
- workos
jobs:
ci:
@@ -11,9 +11,9 @@ class TicketKeyReferenceMatcherTest extends TestCase
use RefreshDatabase;
/**
* Ensure a reference must start with the exact ticket key.
* Ensure a reference matches when it contains the ticket key, regardless of case.
*/
public function test_matcher_accepts_exact_ticket_key_prefixes(): void
public function test_matcher_accepts_references_containing_the_ticket_key_case_insensitively(): void
{
$matcher = app(TicketKeyReferenceMatcher::class);
@@ -21,17 +21,19 @@ class TicketKeyReferenceMatcherTest extends TestCase
$this->assertTrue($matcher->matches('CORE-1', 'CORE-1/fix-oauth'));
$this->assertTrue($matcher->matches('CORE-1', 'CORE-1_hotfix'));
$this->assertTrue($matcher->matches('CORE-1', 'CORE-1'));
$this->assertTrue($matcher->matches('CORE-1', 'core-1-login-form'));
$this->assertTrue($matcher->matches('CORE-1', 'CORE-10-login-form'));
$this->assertTrue($matcher->matches('CORE-1', 'MY-CORE-1-login-form'));
}
/**
* Ensure similar ticket keys are not treated as matches.
* Ensure references without the ticket key are not treated as matches.
*/
public function test_matcher_rejects_other_ticket_prefixes(): void
public function test_matcher_rejects_references_without_the_ticket_key(): void
{
$matcher = app(TicketKeyReferenceMatcher::class);
$this->assertFalse($matcher->matches('CORE-1', 'CORE-10-login-form'));
$this->assertFalse($matcher->matches('CORE-1', 'MY-CORE-1-login-form'));
$this->assertFalse($matcher->matches('CORE-1', 'core-1-login-form'));
$this->assertFalse($matcher->matches('CORE-1', 'CORE-2-login-form'));
$this->assertFalse($matcher->matches('CORE-1', 'feature/auth-cleanup'));
}
}
+2 -2
View File
@@ -54,7 +54,7 @@ class BoardColumnTest extends TestCase
}
/**
* Ensure board columns expose tickets ordered by descending sequence number.
* Ensure board columns expose tickets ordered by ascending sequence number.
*/
public function test_board_column_tickets_are_returned_in_sequence_order(): void
{
@@ -98,7 +98,7 @@ class BoardColumnTest extends TestCase
]);
$this->assertSame(
['CORE-2', 'CORE-1'],
['CORE-1', 'CORE-2'],
$boardColumn->fresh()->tickets->pluck('ticket_key')->all(),
);
}
@@ -338,18 +338,21 @@ class ProjectTicketControllerTest extends TestCase
->component('projects/Ticket')
->where('suggestedBranchName', 'core-1-branch-detail-test')
->where('repositoryBranches.0.repository_connection.repository_full_name', 'core-team/kanbangit')
->has('repositoryBranches.0.branches', 2)
->has('repositoryBranches.0.branches', 3)
->where('repositoryBranches.0.branches.0.name', 'CORE-1-login-form')
->where('repositoryBranches.0.branches.1.name', 'CORE-1/fix-oauth')
->where('repositoryBranches.0.branches.2.name', 'CORE-10-should-not-match')
->where('repositoryBranches.1.repository_connection.repository_full_name', 'other-team/mobile')
->where('repositoryBranches.1.repository_connection.has_personal_access', false)
->where('repositoryBranches.1.branches', [])
->has('repositoryPullRequests.0.pull_requests', 2)
->has('repositoryPullRequests.0.pull_requests', 3)
->where('repositoryPullRequests.0.pull_requests.0.number', '42')
->where('repositoryPullRequests.0.pull_requests.0.title', 'Add login form')
->where('repositoryPullRequests.0.pull_requests.0.status', 'open')
->where('repositoryPullRequests.0.pull_requests.1.number', '43')
->where('repositoryPullRequests.0.pull_requests.1.status', 'merged')
->where('repositoryPullRequests.0.pull_requests.2.number', '99')
->where('repositoryPullRequests.0.pull_requests.2.status', 'open')
->where('repositoryPullRequests.1.repository_connection.repository_full_name', 'other-team/mobile')
->where('repositoryPullRequests.1.repository_connection.has_personal_access', false)
->where('repositoryPullRequests.1.pull_requests', []),