Skip to content
This repository was archived by the owner on Jun 11, 2025. It is now read-only.

feat: text search on image name#370

Merged
nxtcoder17 merged 1 commit into
release-v1.0.7from
fix/search-image-registries
Sep 25, 2024
Merged

feat: text search on image name#370
nxtcoder17 merged 1 commit into
release-v1.0.7from
fix/search-image-registries

Conversation

@nxtcoder17
Copy link
Copy Markdown
Member

@nxtcoder17 nxtcoder17 commented Sep 25, 2024

  • search image registries, with empty query, returns 10 recent images

Summary by Sourcery

Add text search capability for image names in the registry and enhance the search functionality to return the 10 most recent images when no query is provided.

New Features:

  • Implement text search functionality on image names in the registry.

Enhancements:

  • Return the 10 most recent images when the search query is empty.

- search image registries, with empty query, returns 10 recent images
@sourcery-ai
Copy link
Copy Markdown

sourcery-ai Bot commented Sep 25, 2024

Reviewer's Guide by Sourcery

This pull request implements a text search feature for image names in the registry. It modifies the search functionality to return 10 recent images when the query is empty and adds a text index on the image name field to support text search.

File-Level Changes

Change Details Files
Implement empty query handling in SearchRegistryImages function
  • Add a condition to check if the query is empty
  • Return 10 most recent images when query is empty
  • Use the registryImageRepo.Find method with specific parameters for empty query
apps/console/internal/domain/registry-image.go
Add text index on image name field
  • Include fc.RegistryImageImageName in the RegistryImageIndexes array
  • Set the index type as text for the image name field
apps/console/internal/entities/registry-image.go
Minor code formatting change in schema resolvers
  • Group mutationResolver and queryResolver struct definitions using type keyword
apps/console/internal/app/graph/schema.resolvers.go

Sequence Diagram

No sequence diagram generated.


Tips
  • Trigger a new Sourcery review by commenting @sourcery-ai review on the pull request.
  • Continue your discussion with Sourcery by replying directly to review comments.
  • You can change your review settings at any time by accessing your dashboard:
    • Enable or disable the Sourcery-generated pull request summary or reviewer's guide;
    • Change the review language;
  • You can always contact us if you have any questions or feedback.

@nxtcoder17 nxtcoder17 self-assigned this Sep 25, 2024
Copy link
Copy Markdown

@sourcery-ai sourcery-ai Bot left a comment

Choose a reason for hiding this comment

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

Hey @nxtcoder17 - I've reviewed your changes and they look great!

Here's what I looked at during the review
  • 🟢 General issues: all looks good
  • 🟢 Security: all looks good
  • 🟢 Testing: all looks good
  • 🟢 Complexity: all looks good
  • 🟢 Documentation: all looks good

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment to tell me if it was helpful.

@nxtcoder17 nxtcoder17 merged commit ab7b237 into release-v1.0.7 Sep 25, 2024
@nxtcoder17 nxtcoder17 deleted the fix/search-image-registries branch September 27, 2024 04:45
abdheshnayak pushed a commit that referenced this pull request Nov 5, 2024
feat: text search on image name
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant