Skip to content

Conversation

@josdem
Copy link
Owner

@josdem josdem commented Dec 2, 2025

  • Adding find by email in a single search feature
  • Adding missing tests
  • Updating project version

Copy link
Contributor

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 adds email-based user lookup to the existing flexible search functionality, extends test coverage for the new search chain, and bumps the project version. The getByUsername method is renamed to getUser to better reflect its expanded capability to search by username, mobile, or email in a single call.

Key Changes:

  • Extended getUser method to chain username → mobile → email lookups using Optional's or() operator
  • Renamed method from getByUsername to getUser across service interface, implementation, and controller
  • Added comprehensive test cases for mobile and email fallback scenarios

Reviewed changes

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

Show a summary per file
File Description
src/main/java/com/josdem/vetlog/service/UserService.java Renamed method from getByUsername to getUser in interface
src/main/java/com/josdem/vetlog/service/impl/UserServiceImpl.java Added email lookup as third option in search chain and renamed method
src/main/java/com/josdem/vetlog/controller/VetController.java Updated method call to use renamed getUser method
src/test/java/com/josdem/vetlog/service/UserServiceTest.kt Added test cases for mobile and email fallback scenarios, updated existing tests
build.gradle.kts Incremented version from 3.3.2 to 3.3.3

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@sonarqubecloud
Copy link

sonarqubecloud bot commented Dec 2, 2025

@josdem josdem merged commit 95f6333 into main Dec 2, 2025
3 checks passed
@josdem josdem mentioned this pull request Dec 2, 2025
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.

2 participants