lukaszlach / satis-server

:whale: Private, self-hosted Composer/Satis repository with unlimited private and open-source packages and support for Git, Mercurial, and Subversion. HTTP API, HTTPs support, webhook handler, scheduled builds, Slack and HipChat integration.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Problem with partial match of repo name.

soderlind opened this issue · comments

I have 4 repos;

vendor/aaa-bbb
vendor/aaa-bbb-ccc
vendor/aaa-bbb-ddd
vendor/aaa-bbb-eee

When I do curl -n -sS -d'url=https://github.com/vendor/aaa-bbb' https://satis/api/build I get the following error:

Scanning packages
  [InvalidArgumentException]
  Specified repository url "https://github.com/vendor/aaa-bbb
  https://github.com/vendor/aaa-bbb-ccc
  https://github.com/vendor/aaa-bbb-ddd
  https://github.com/vendor/aaa-bbb-eee" does not exist.

NOTE, satis believes the url is https://github.com/vendor/aaa-bbb https://github.com/vendor/aaa-bbb-ccc https://github.com/vendor/aaa-bbb-ddd https://github.com/vendor/aaa-bbb-eee

curl -n -sS -d'url=https://github.com/vendor/aaa-bbb' https://satis/api/show gives me:

jq: error (at <stdin>:1): null (null) has no keys
Package: vendor/aaa-bbb
 vendor/aaa-bbb-ccc
 vendor/aaa-bbb-ddd
 vendor/aaa-bbb-eee
Description:
Authors:
Releases:
Homepage:
Last built: Mon Apr 26 00:02:04 2021

If I do curl -n -sS -d'url=https://github.com/vendor/aaa-bbb-ccc' https://satis/api/show, I get the expected result.

The problem is satis build so I'm closing the ticket.

curl -n -sS -d'url=https://github.com/vendor/aaa-bbb' https://satis/api/build

Scanning packages


  [InvalidArgumentException]
  Specified repository url "https://github.com/vendor/aaa-bbb
  https://github.com/vendor/aaa-bbb-ccc
  https://github.com/vendor/aaa-bbb-ddd
  https://github.com/vendor/aaa-bbb-eee" does not exist.


Exception trace:
 () at /satis/src/PackageSelection/PackageSelection.php:176
 Composer\Satis\PackageSelection\PackageSelection->select() at /satis/src/Console/Command/BuildCommand.php:178
 Composer\Satis\Console\Command\BuildCommand->execute() at /satis/vendor/symfony/console/Command/Command.php:264
 Symfony\Component\Console\Command\Command->run() at /satis/vendor/symfony/console/Application.php:874
 Symfony\Component\Console\Application->doRunCommand() at /satis/vendor/symfony/console/Application.php:228
 Symfony\Component\Console\Application->doRun() at /satis/src/Console/Application.php:52
 Composer\Satis\Console\Application->doRun() at /satis/vendor/symfony/console/Application.php:130
 Symfony\Component\Console\Application->run() at /satis/bin/satis:26