hcesrl / gitlab-composer
A Composer repository index generator for your GitLab CE projects
v0.2.0
2020-03-13 10:14 UTC
Requires
- m4tthumphrey/php-gitlab-api: ^9.6
- php-http/guzzle6-adapter: ^1.1|^2.0
Requires (Dev)
- filp/whoops: ~2.0
- phpunit/phpunit: ~7.0
This package is auto-updated.
Last update: 2025-02-13 21:42:52 UTC
README
A Composer repository index generator for your GitLab CE projects.
Installation
Install the package:
composer require hcesrl/gitlab-composer
Usage
Create a new instance of the Packages
object with the GitLab CE Api endpoint and the access token:
$packages = new \GitLabComposer\Packages( 'https://gitlab.example.com/api/v4/', 'some_access_token' );
Customize the behaviour by setting a path for the cache files and a whitelist of groups and projects:
$packages->setCachePath ( __DIR__ . '/../cache' ); $packages->addGroup ( 'group1', 'group2' ); $packages->addProject ( 'group1/foo', 'group2/bar', 'group2/foobar' );
Render the packages json file:
$packages->render();
License
This package is open-sourced software licensed under the MIT license.