Skip to content

Support Moodle cloning from local repo#376

Merged
vmdef merged 1 commit intomoodlehq:mainfrom
kabalin:306
Feb 6, 2026
Merged

Support Moodle cloning from local repo#376
vmdef merged 1 commit intomoodlehq:mainfrom
kabalin:306

Conversation

@kabalin
Copy link
Copy Markdown
Member

@kabalin kabalin commented Feb 3, 2026

Fixes #306

Copilot AI review requested due to automatic review settings February 3, 2026 21:11
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR adds support for cloning Moodle from local repositories in addition to remote Git URLs. The validation logic now accepts file:// URLs and various directory path formats (absolute, relative, and home directory paths), making the behavior consistent with git clone.

Changes:

  • Enhanced URL validation to accept local repository paths (file://, absolute, relative, and ~ paths)
  • Updated documentation to reflect local repository support
  • Added test cases for the new local path formats

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
src/Validate.php Added validation logic for file:// URLs and directory paths before falling back to standard git URL validation
tests/ValidateTest.php Added test cases for valid local path formats and updated invalid URL test cases with clarifying comments
src/Command/InstallCommand.php Updated --repo option description to mention local path support
docs/CLI.md Updated --repo documentation to mention local path support
docs/CHANGELOG.md Added changelog entry documenting the new feature

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/Validate.php
Comment thread docs/CHANGELOG.md
@codecov
Copy link
Copy Markdown

codecov Bot commented Feb 3, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 88.26%. Comparing base (3f5ae0d) to head (51fbd2c).
⚠️ Report is 2 commits behind head on main.

Additional details and impacted files
@@             Coverage Diff              @@
##               main     #376      +/-   ##
============================================
+ Coverage     88.24%   88.26%   +0.02%     
- Complexity      764      767       +3     
============================================
  Files            77       77              
  Lines          2330     2334       +4     
============================================
+ Hits           2056     2060       +4     
  Misses          274      274              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link
Copy Markdown
Contributor

@vmdef vmdef left a comment

Choose a reason for hiding this comment

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

Thanks @kabalin .
The changes make sense and are well documented and tested.

@vmdef vmdef merged commit d87c3ce into moodlehq:main Feb 6, 2026
32 of 33 checks passed
@kabalin kabalin deleted the 306 branch February 6, 2026 17:23
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.

Support Moodle cloning from local repo

3 participants