Skip to content

Conversation

RGO230
Copy link
Contributor

@RGO230 RGO230 commented Aug 23, 2025

No description provided.

@coveralls
Copy link

coveralls commented Aug 23, 2025

Pull Request Test Coverage Report for Build 17382198860

Details

  • 25 of 26 (96.15%) changed or added relevant lines in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage decreased (-0.4%) to 98.76%

Changes Missing Coverage Covered Lines Changed/Added Lines %
src/Commands/InitCommand.php 25 26 96.15%
Totals Coverage Status
Change from base Build 17198213954: -0.4%
Covered Lines: 239
Relevant Lines: 242

💛 - Coveralls

@RGO230 RGO230 assigned RGO230 and DenTray and unassigned DenTray and RGO230 Aug 23, 2025
@DenTray DenTray assigned RGO230 and unassigned DenTray Aug 25, 2025
@RGO230 RGO230 assigned DenTray and unassigned RGO230 Aug 25, 2025
@astorozhevsky astorozhevsky requested a review from Copilot August 28, 2025 09:37
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR introduces Clerk authentication integration with application type awareness. The changes add support for configuring Clerk credentials based on whether the application serves mobile, web, or multiplatform clients, and reorganizes the initialization flow to determine application type before authentication configuration.

  • Adds AppTypeEnum to categorize application types (Mobile, Web, Multiplatform)
  • Updates Clerk authentication setup to conditionally include CLERK_ALLOWED_ORIGINS based on app type
  • Reorders the initialization flow to ask for application type before authentication type

Reviewed Changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
src/Enums/AppTypeEnum.php Defines new enum for application types with Mobile, Web, and Multiplatform values
src/Commands/InitCommand.php Updates initialization flow and adds conditional Clerk configuration logic
tests/InitCommandTest.php Updates test expectations to match new question order and adds new test for Clerk mobile app scenario
tests/fixtures/InitCommandTest/*.yml Updates fixture files to include new Clerk credential environment variables
tests/fixtures/InitCommandTest/*.md Updates README fixture files with Clerk authentication documentation

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

$lines[] = "\n{$key}{$separator}{$value}";
$item = "{$key}{$separator}{$value}";

if (Str::before($key, '_') === Str::before($previousKey, '_')) {
Copy link
Preview

Copilot AI Aug 28, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This comparison will fail on the first iteration when $previousKey is null. The Str::before() method will return the entire string when the delimiter is not found, but comparing with null will cause unexpected behavior.

Suggested change
if (Str::before($key, '_') === Str::before($previousKey, '_')) {
if ($previousKey !== null && Str::before($key, '_') === Str::before($previousKey, '_')) {

Copilot uses AI. Check for mistakes.

@RGO230 RGO230 assigned RGO230 and unassigned DenTray Aug 28, 2025
@RGO230 RGO230 assigned DenTray and unassigned RGO230 Aug 28, 2025
@DenTray DenTray merged commit b154a63 into main Sep 1, 2025
3 checks passed
@DenTray DenTray deleted the 3-86c34dha8-clerk-step branch September 1, 2025 15:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants