Skip to content
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

feat(server): enable original key filter #1285

Merged
merged 1 commit into from
Nov 27, 2024
Merged

Conversation

hexaforce
Copy link
Contributor

@hexaforce hexaforce commented Nov 27, 2024

Overview

Projects from a different workspace are shown when fetching projects

What I've done

This bug will be resolved by incorporating this fix.
reearth/reearthx#57

What I haven't done

How I tested

Which point I want you to review particularly

Memo

Summary by CodeRabbit

  • New Features

    • Updated dependency for improved functionality or bug fixes in the reearthx package.
  • Bug Fixes

    • Enhanced pagination handling for project entities, improving data retrieval efficiency.

@hexaforce hexaforce self-assigned this Nov 27, 2024
@hexaforce hexaforce requested a review from pyshx as a code owner November 27, 2024 12:23
Copy link

coderabbitai bot commented Nov 27, 2024

Walkthrough

The pull request includes updates to the go.mod file, specifically changing the version of the github.com/reearth/reearthx dependency. Additionally, it modifies the paginate method in the Project struct located in server/internal/infrastructure/mongo/project.go, changing the pagination method from r.client.Paginate to r.client.PaginateProject, while keeping the method's parameters unchanged.

Changes

File Change Summary
server/go.mod Updated dependency version for github.com/reearth/reearthx from v0.0.0-20241120060035-e4cc7e5e2643 to v0.0.0-20241127093551-4fcdd23fa824.
server/internal/infrastructure/mongo/project.go Modified the paginate method to use r.client.PaginateProject instead of r.client.Paginate, with no changes to parameters or method signature.

Possibly related PRs

  • feat(server): get only what hasn't been deleted #1179: The changes in this PR involve modifications to the Project struct, specifically in the FindByWorkspace method, which is related to project filtering, similar to the pagination changes in the paginate method of the Project struct in the main PR.

Suggested labels

server

Suggested reviewers

  • pyshx

🐇 In the code, we hop and play,
New versions come to light today.
Pagination's path has changed its way,
With reearthx leading the fray!
Let's code and cheer, hip-hip-hooray! 🎉


📜 Recent review details

Configuration used: .coderabbit.yaml
Review profile: CHILL

📥 Commits

Reviewing files that changed from the base of the PR and between 90ef02f and 0d50ec3.

⛔ Files ignored due to path filters (1)
  • server/go.sum is excluded by !**/*.sum
📒 Files selected for processing (2)
  • server/go.mod (1 hunks)
  • server/internal/infrastructure/mongo/project.go (1 hunks)
✅ Files skipped from review due to trivial changes (1)
  • server/go.mod
🔇 Additional comments (1)
server/internal/infrastructure/mongo/project.go (1)

254-257: LGTM! The change to PaginateProject should fix the workspace filtering issue.

The switch from generic Paginate to PaginateProject aligns with the PR objective of fixing cross-workspace project visibility. The method maintains proper error handling and workspace filtering through the project consumer.

Let's verify the implementation of the new pagination method:


Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link

netlify bot commented Nov 27, 2024

Deploy Preview for reearth-web canceled.

Name Link
🔨 Latest commit 0d50ec3
🔍 Latest deploy log https://app.netlify.com/sites/reearth-web/deploys/67470f498db5dd0008413c3e

@hexaforce hexaforce changed the title enable original key filter feat(server): enable original key filter Nov 27, 2024
@pyshx pyshx merged commit 58c184f into main Nov 27, 2024
18 of 20 checks passed
@pyshx pyshx deleted the feat/enable-original-key-filter branch November 27, 2024 14:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants