Skip to content

fix(ci):use IUserFolder when needed - #5729

Merged
hamza221 merged 1 commit into
mainfrom
fix/ci
Sep 16, 2026
Merged

hamza221 merged 1 commit into
mainfrom
fix/ci

Conversation

@hamza221

@hamza221 hamza221 commented Sep 16, 2026 •

Copy link
Copy Markdown
Contributor

introduced in nextcloud/server#53048

🤖 AI (if applicable)

  • The content of this PR was partly or fully generated using AI (N/A)

Summary by CodeRabbit

  • Tests
    • Improved compatibility of import controller tests across supported server versions.
    • Updated user-folder test mocks to use the appropriate interface or fallback implementation based on server availability.

Signed-off-by: Hamza <hamzamahjoubi221@gmail.com>
@hamza221

hamza221 commented Sep 16, 2026 •

Copy link
Copy Markdown
Contributor Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Sep 16, 2026 •

Copy link
Copy Markdown
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@hamza221 hamza221 mentioned this pull request Sep 16, 2026
1 task
@coderabbitai

coderabbitai Bot commented Sep 16, 2026

Copy link
Copy Markdown

Review Change StackReview Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Advanced

Run ID: 0033f649-2346-4787-86b2-ab435404ec87

📥 Commits

Reviewing files that changed from the base of the PR and between 5c4d2b9 and a03a483.

📒 Files selected for processing (1)
  • tests/unit/Controller/ImportControllerTest.php

Included review availability: Your plan provides up to 4 included reviews per hour; 3 remain after this review.


📝 Walkthrough

Walkthrough

The import controller tests now use a helper that mocks IUserFolder on server 36+ and Folder on older supported servers. Existing import scenarios use the helper instead of directly mocking Folder.

Changes

Import controller test compatibility

Layer / File(s) Summary
Version-aware user-folder mocks
tests/unit/Controller/ImportControllerTest.php
The test file imports IUserFolder, adds createUserFolderMock(), and updates the import tests to use the helper. The helper falls back to Folder when IUserFolder is unavailable.

Priority: ⬇️ Low

Estimated code review effort: 1 (Trivial) | ~5 minutes

Change: Bug fix

Merge Risk: ⚪ Minimal · up to a03a4

The version-aware test mocks are compatible with all supported CI server versions, with no concrete merge-blocking risk identified.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 33.33% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 9 functions across 1 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the main change: updating CI test handling to use IUserFolder when required. It is concise and specific.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
  • Fix all pre-merge checks with AI
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/ci

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.

@codecov

codecov Bot commented Sep 16, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@hamza221
hamza221 enabled auto-merge September 16, 2026 10:44
@hamza221
hamza221 merged commit 5e8125b into main Sep 16, 2026
46 checks passed
@hamza221
hamza221 deleted the fix/ci branch September 16, 2026 10:48
@hamza221

Copy link
Copy Markdown
Contributor Author

/backport to stable8.9

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.

3 participants