Skip to content

Conversation

RGO230
Copy link
Contributor

@RGO230 RGO230 commented Aug 25, 2025

No description provided.

@RGO230 RGO230 changed the base branch from main to 3-86c34dha8-clerk-step August 25, 2025 12:40
@RGO230 RGO230 changed the base branch from 3-86c34dha8-clerk-step to main August 25, 2025 12:44
@astorozhevsky astorozhevsky requested a review from Copilot August 28, 2025 09:37
Copilot

This comment was marked as outdated.

@RGO230 RGO230 assigned RGO230 and unassigned DenTray Aug 28, 2025
@coveralls
Copy link

coveralls commented Aug 28, 2025

Pull Request Test Coverage Report for Build 17458111807

Warning: This coverage report may be inaccurate.

This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.

Details

  • 15 of 16 (93.75%) changed or added relevant lines in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.05%) to 98.805%

Changes Missing Coverage Covered Lines Changed/Added Lines %
src/Commands/InitCommand.php 15 16 93.75%
Totals Coverage Status
Change from base Build 17382247984: 0.05%
Covered Lines: 248
Relevant Lines: 251

💛 - Coveralls

@RGO230 RGO230 assigned DenTray and unassigned RGO230 Aug 28, 2025
@DenTray
Copy link
Collaborator

DenTray commented Sep 1, 2025

@RGO230 please merge actual main to this branch to avoid duplicated changes

@DenTray DenTray assigned RGO230 and unassigned DenTray Sep 1, 2025
@RGO230 RGO230 assigned DenTray and unassigned RGO230 Sep 2, 2025
migrationName: 'users_add_clerk_id_field',
);

$this-> publishView(
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
$this-> publishView(
$this->publishView(

}

protected function publishMigration(View $view, string $migrationName): void
protected function publishView(View $view, string $viewName, string $path): void
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
protected function publishView(View $view, string $viewName, string $path): void
protected function publishClass(View $template, string $fileName, string $filePath): void


$migrationName = "{$time}_{$migrationName}";

$this->publishView($view, $migrationName, "database/migrations");
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
$this->publishView($view, $migrationName, "database/migrations");
$this->publishView($view, $migrationName, 'database/migrations');

@DenTray DenTray requested a review from Copilot September 4, 2025 04:49
Copilot

This comment was marked as outdated.

@DenTray DenTray assigned RGO230 and unassigned DenTray Sep 4, 2025
@RGO230 RGO230 assigned DenTray and unassigned RGO230 Sep 4, 2025
@DenTray DenTray requested a review from Copilot September 5, 2025 07:31
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 implements Clerk authentication integration by adding a custom user repository class that handles user creation and lookup based on JWT tokens. The changes include refactoring file publishing functionality and adding Clerk-specific user management.

  • Adds ClerkUserRepository class that extends the base Clerk user repository to handle user creation with role assignment
  • Refactors the InitCommand to use a new publishClass method for better code organization
  • Updates tests to verify the new Clerk user repository file is generated correctly

Reviewed Changes

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

File Description
tests/fixtures/InitCommandTest/clerk_user_repository.php Test fixture containing the expected output for the generated ClerkUserRepository class
tests/InitCommandTest.php Adds test assertions to verify ClerkUserRepository.php is generated in the correct location
src/Commands/InitCommand.php Refactors file publishing logic and adds Clerk user repository generation to the enableClerk method
resources/views/clerk_user_repository.blade.php Blade template for generating the ClerkUserRepository class

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


if ($envFile !== '.env.example') {
$this->createOrUpdateConfigFile('.env.example', '=', $data);
if ($envFile === '.env') {
Copy link
Preview

Copilot AI Sep 5, 2025

Choose a reason for hiding this comment

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

The logic change inverts the previous condition from !== '.env.example' to === '.env'. This appears to be a significant behavioral change that could affect which environment files get updated. Ensure this change is intentional and properly tested.

Suggested change
if ($envFile === '.env') {
if ($envFile !== '.env.example') {

Copilot uses AI. Check for mistakes.

@DenTray DenTray merged commit ef6476a into main Sep 9, 2025
3 checks passed
@DenTray DenTray deleted the 4-86c34dha8-clerk-step branch September 9, 2025 03:11
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