Skip to content

Conversation

abnegate
Copy link
Member

@abnegate abnegate commented Sep 23, 2025

This PR contains updates to the Apple SDK for version 12.1.0.

Summary by CodeRabbit

  • New Features

    • Added a random ordering option to the query builder, enabling retrieval of results in a randomized order.
  • Documentation

    • Clarified that execution request headers refer to HTTP request headers, improving accuracy and understanding in the API docs.

Copy link

coderabbitai bot commented Sep 23, 2025

Walkthrough

  • Introduces a new public static helper method orderRandom() -> String in Sources/Appwrite/Query.swift that builds a Query with method set to "orderRandom" and returns its description; no attributes or values are provided.
  • Updates documentation in Sources/AppwriteModels/Execution.swift, changing requestHeaders description from HTTP response headers to HTTP request headers; no API or behavior changes.

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title Check ✅ Passed The title "feat: Apple SDK update for version 12.1.0" is concise and clearly indicates the primary intent (an SDK version update), which aligns with the changeset's purpose of updating the Apple SDK. However, the PR metadata and description reference version 12.0.0, creating a version-number inconsistency that could confuse reviewers. Given it otherwise summarizes the main change, the title is acceptable but the version mismatch should be resolved.
✨ Finishing touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch dev

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (1)
Sources/AppwriteModels/Execution.swift (1)

58-60: Doc fix LGTM; tighten wording and switch to inclusive language.

Consider aligning the type wording with the actual [Headers] model and replacing “whitelisted” with “allowlisted” (do the same for responseHeaders for consistency).

-    /// HTTP request headers as a key-value object. This will return only whitelisted headers. All headers are returned if execution is created as synchronous.
+    /// HTTP request headers as an array of header objects (Headers). This returns only allowlisted headers. All headers are returned if the execution is created as synchronous.
-    /// HTTP response headers as a key-value object. This will return only whitelisted headers. All headers are returned if execution is created as synchronous.
+    /// HTTP response headers as an array of header objects (Headers). This returns only allowlisted headers. All headers are returned if the execution is created as synchronous.

Also applies to: 67-68

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between c6f0f39 and 33f0649.

📒 Files selected for processing (2)
  • Sources/Appwrite/Query.swift (1 hunks)
  • Sources/AppwriteModels/Execution.swift (1 hunks)
🔇 Additional comments (1)
Sources/Appwrite/Query.swift (1)

283-287: New Query.orderRandom(): looks good; please verify backend support and add a tiny test.

Matches existing pattern (no attribute/values). Suggest adding a unit test asserting JSON equals {"method":"orderRandom"} for SDK 12.0.0.

// Pseudocode test
XCTAssertEqual(Query.orderRandom(), #"{"method":"orderRandom"}"#)

Copy link
Member

@ChiragAgg5k ChiragAgg5k left a comment

Choose a reason for hiding this comment

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

the version should be 11.1.0 no? even if there is no code change lets update the pr desc and title so we dont accidentally release the wrong version

@abnegate abnegate changed the title feat: Apple SDK update for version 12.0.0 feat: Apple SDK update for version 12.1.0 Sep 23, 2025
@abnegate abnegate merged commit add7882 into main Sep 23, 2025
1 check passed
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