Question

Scenartio:

We have an internal packagist.org installation for our private repositories. These packages/repositories are hosted on our privat GitLab-server.

As we have a lot of packages (~150 and counting) it would be great to to add these by an automated command, that will register them.

Problem:

I've wrote an command that will call the GitLab API to fetch a list of all repositories. That works very well so far. Now i'm at the point where i have to import these Git-URLs into our packagist, but i can't find a service or controller with an complete example of how to do that.

I found the WebController where the "magic" happens, but i don't find the point where the repository gets called to fetch the remote composer.json file (to find the package name etc).

I hope anyone can point me the way! :D

Was it helpful?

Solution

Ended up writing my own method for that, if you need this too, you can grab the code here: https://gist.github.com/sweikenb/dc800442db8d0647bdbe

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top