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

Adding Drive group Id to listFiles #284

Merged
merged 3 commits into from
Feb 28, 2025
Merged

Adding Drive group Id to listFiles #284

merged 3 commits into from
Feb 28, 2025

Conversation

pellicceama
Copy link
Collaborator

@pellicceama pellicceama commented Feb 28, 2025

Important

Add drive_group_id parameter to listFiles for filtering by drive group ID in file storage.

  • Behavior:
    • Add drive_group_id query parameter to listFiles in openapi.json and openapi.types.d.ts.
    • Update listFiles in router.ts to accept drive_group_id.
    • Modify listFiles in sharepoint-adapter/index.ts to handle drive_group_id when listing files.
  • Logging:
    • Update error message in getRemoteContext() in remote-procedure.ts to "Refresh credentials error".

This description was created by Ellipsis for 5a17be5. It will automatically update as commits are pushed.

Copy link

vercel bot commented Feb 28, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
openint ✅ Ready (Inspect) Visit Preview 💬 Add feedback Feb 28, 2025 7:28pm

Copy link

recurseml bot commented Feb 28, 2025

✨ No issues found! Your code is sparkling clean! ✨

Copy link
Contributor

@ellipsis-dev ellipsis-dev bot left a comment

Choose a reason for hiding this comment

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

👍 Looks good to me! Reviewed everything up to 5a17be5 in 1 minute and 36 seconds

More details
  • Looked at 70 lines of code in 5 files
  • Skipped 0 files when reviewing.
  • Skipped posting 16 drafted comments based on config settings.
1. unified/unified-file-storage/adapters/sharepoint-adapter/index.ts:190
  • Draft comment:
    Consider renaming the local variable 'siteId' (which receives input?.drive_group_id) to 'driveGroupId' for clarity and consistency with the router input.
  • Reason this comment was not posted:
    Comment was not on a location in the diff, so it can't be submitted as a review comment.
2. unified/unified-file-storage/adapters/sharepoint-adapter/index.ts:295
  • Draft comment:
    When no drive_id is provided, listing drives across all sites is done via 'listDrives' — note that pagination is not supported in this branch. Consider documenting this behavior clearly.
  • Reason this comment was not posted:
    Comment did not seem useful. Confidence is useful = 0% <= threshold 50%
    The comment is purely informative, explaining the behavior of the code when no drive_id is provided. It suggests documenting this behavior, which is not a specific code suggestion or request for a test. It doesn't align with the rules for good comments.
3. unified/unified-file-storage/adapters/sharepoint-adapter/index.ts:59
  • Draft comment:
    In the catch block of getFileFromDrives, error checking uses error?.error?.error?.code. Consider standardizing the error shape or refining the check for 'itemNotFound' to improve maintainability.
  • Reason this comment was not posted:
    Comment was not on a location in the diff, so it can't be submitted as a review comment.
4. unified/unified-file-storage/router.ts:42
  • Draft comment:
    Drive group id has been added to the input schema for listFiles, which aligns with the changes in the adapter. Ensure that API docs mention this new optional parameter.
  • Reason this comment was not posted:
    Confidence changes required: 50% <= threshold 50%
    None
5. unified/unified-file-storage/adapters/sharepoint-adapter/index.ts:272
  • Draft comment:
    When calling instance.GET in listFiles, 'driveItem-id' is always provided in the path—even when folder_id is undefined. Consider conditionally including 'driveItem-id' only if input.folder_id exists.
  • Reason this comment was not posted:
    Comment was not on a location in the diff, so it can't be submitted as a review comment.
6. unified/unified-file-storage/adapters/sharepoint-adapter/index.ts:324
  • Draft comment:
    Swallowing errors in the promise chain (using catch(() => ({ value: [] }))) may hide problems. Consider logging or otherwise handling the error instead of returning an empty array.
  • Reason this comment was not posted:
    Comment was not on a location in the diff, so it can't be submitted as a review comment.
7. unified/unified-file-storage/adapters/sharepoint-adapter/index.ts:68
  • Draft comment:
    The condition checking result validity compares res.id to the string 'undefined'. If the API returns an undefined value, a strict null or undefined check is preferable.
  • Reason this comment was not posted:
    Comment was not on a location in the diff, so it can't be submitted as a review comment.
8. unified/unified-file-storage/adapters/sharepoint-adapter/index.ts:164
  • Draft comment:
    Before parsing responses with response.json(), validate that response.ok is true to properly handle API error responses.
  • Reason this comment was not posted:
    Comment was not on a location in the diff, so it can't be submitted as a review comment.
9. unified/unified-file-storage/router.ts:13
  • Draft comment:
    Verify that the OpenAPI metadata paths are correctly formed (using oapi) to match intended endpoints.
  • Reason this comment was not posted:
    Confidence changes required: 50% <= threshold 50%
    None
10. kits/cdk/internal/remote-procedure.ts:26
  • Draft comment:
    Typographical error in comment: Change 'Elevant role to organization here' to 'Elevate role to organization here'.
  • Reason this comment was not posted:
    Comment was not on a location in the diff, so it can't be submitted as a review comment.
11. kits/sdk/openapi.json:447
  • Draft comment:
    Typo detected: The phrase 'JSON object can can be used to associate arbitrary metadata...' contains a duplicate 'can'. Please change it to 'JSON object can be used to associate arbitrary metadata...'.
  • Reason this comment was not posted:
    Comment was not on a location in the diff, so it can't be submitted as a review comment.
12. kits/sdk/openapi.json:1044
  • Draft comment:
    Typo detected: The word 'implmementation' appears in the description (e.g., 'See coda's implmementation...'). Please correct it to 'implementation'.
  • Reason this comment was not posted:
    Comment was not on a location in the diff, so it can't be submitted as a review comment.
13. kits/sdk/openapi.types.d.ts:591
  • Draft comment:
    Typo found: The comment currently reads "JSON object can can be used...". Please remove the extra 'can' so it reads "JSON object can be used...".
  • Reason this comment was not posted:
    Comment was not on a location in the diff, so it can't be submitted as a review comment.
14. kits/sdk/openapi.types.d.ts:2808
  • Draft comment:
    Typo found: In the comment for 'todo_removeUnsyncedData', 'implmementation' should be corrected to 'implementation'.
  • Reason this comment was not posted:
    Comment was not on a location in the diff, so it can't be submitted as a review comment.
15. unified/unified-file-storage/adapters/sharepoint-adapter/index.ts:49
  • Draft comment:
    The TODO comment for @ts-expect-error on $expandParams seems to be missing a closing quotation mark. Consider adding the closing quote for clarity (e.g., "$expandParams").
  • Reason this comment was not posted:
    Comment was not on a location in the diff, so it can't be submitted as a review comment.
16. unified/unified-file-storage/adapters/sharepoint-adapter/index.ts:318
  • Draft comment:
    The TODO comment for @ts-expect-error regarding $skiptoken appears to be missing a closing quotation mark. It would improve clarity to add the missing quote (e.g., "$skiptoken").
  • Reason this comment was not posted:
    Comment was not on a location in the diff, so it can't be submitted as a review comment.

Workflow ID: wflow_oWOIWSS5La65571d


You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet mode, and more.

@pellicceama pellicceama merged commit 2acf703 into main Feb 28, 2025
4 of 5 checks passed
@pellicceama pellicceama deleted the drive-group-id branch February 28, 2025 19:33
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.

1 participant