repman-io / repman

Repman - PHP Repository Manager: packagist proxy and host for private packages
https://repman.io
MIT License
515 stars 107 forks source link

Feature: Synchronise all packages command #536

Closed xvilo closed 2 years ago

xvilo commented 2 years ago

This PR adds the ability to sync all packages at once. We currently have the need for this sometimes and are already able to do this manually through the API. However, it's much easier if this is an out-of-the-box CLI feature.

You can specify to sync all packages from an Organization, or just go through all Organizations and sync their packages.

Can be called like:

# Synchronise all packages from the "buddy" Organization
$ ./bin/console repman:package:synchronize-all buddy

# Synchronise all packages from all available Organizations
$ ./bin/console repman:package:synchronize-all
Synchronizing packages of 2 organizations.
Synchronizing packages for test.
- xvilo/harvest-forceast
Synchronizing packages for buddy.
- cache/filesystem-adapter
- symfony/var-dumper
- symfony/translation
- symfony/routing

Will throw an InvalidArgumentException if the supplied Organization Alias can not be found.

codecov[bot] commented 2 years ago

Codecov Report

Merging #536 (8307899) into master (0de28d9) will increase coverage by 0.00%. The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff            @@
##             master     #536   +/-   ##
=========================================
  Coverage     99.33%   99.33%           
- Complexity     1885     1893    +8     
=========================================
  Files           300      301    +1     
  Lines          5973     5996   +23     
=========================================
+ Hits           5933     5956   +23     
  Misses           40       40           
Impacted Files Coverage Δ
src/Command/SynchronizeAllPackagesCommand.php 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 0de28d9...8307899. Read the comment docs.