-
Notifications
You must be signed in to change notification settings - Fork 1
4 86c34dha8 clerk step #49
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Pull Request Test Coverage Report for Build 17458111807Warning: 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
💛 - Coveralls |
@RGO230 please merge actual |
src/Commands/InitCommand.php
Outdated
migrationName: 'users_add_clerk_id_field', | ||
); | ||
|
||
$this-> publishView( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
$this-> publishView( | |
$this->publishView( |
src/Commands/InitCommand.php
Outdated
} | ||
|
||
protected function publishMigration(View $view, string $migrationName): void | ||
protected function publishView(View $view, string $viewName, string $path): void |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
protected function publishView(View $view, string $viewName, string $path): void | |
protected function publishClass(View $template, string $fileName, string $filePath): void |
src/Commands/InitCommand.php
Outdated
|
||
$migrationName = "{$time}_{$migrationName}"; | ||
|
||
$this->publishView($view, $migrationName, "database/migrations"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
$this->publishView($view, $migrationName, "database/migrations"); | |
$this->publishView($view, $migrationName, 'database/migrations'); |
There was a problem hiding this 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 newpublishClass
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') { |
There was a problem hiding this comment.
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.
if ($envFile === '.env') { | |
if ($envFile !== '.env.example') { |
Copilot uses AI. Check for mistakes.
No description provided.