Search code examples
repositorycomposer-phpphabricatorpackages.json

Phabricator -> packages.json generation


I am using Phabricator to manage internal package in my company.

As we have a lot of packages with a lot of dependencies, it became hard to manage dependencies. it's why I would like to add a packages.json to composer configuration containing all the packages & versions.

But unfortunately I can't find how to do that with phabricator.

As the main purpose of phabricator is to manage packages I can't understand why it is so difficult to handle this simple and essential thing...

Build the packages.json manually will be so hard and time consuming

What is the best way to do that?


Solution

  • I found the answer by myself.

    The best way to do it with phabricator is to use "satis"

    Once you have installed satis, you can generate a packages.json by using satis commands.

    Just read the satis documentation, it is quite simple.

    And to retrieve the phabricator repository list, you have to use the phabricator API "diffusion.repository.search" with a token and call satis commands to add each repository.