Closed timothyb89 closed 6 years ago
The repository scanners added in 838c7f9 solve part of the issue. Now it's trivial to find a module initially (flat or otherwise), but we'll need some sort of hinting mechanism when going the other direction, i.e. how can we take a module name and find it on the filesystem? So far the module name directly corresponds to filesystem path (even landscaper, albeit in a convoluted way), but we can't depend on that with flat repositories.
Some ideas:
modulePath()
checks flat
flag and returns localPath
when set, otherwise falls back to current resolution logicPartial support was added in https://github.com/monasca/pr-bot/commit/4bd94e5a808f52a39399c2a8bbb5d96018fa0e05 to support docker-compose plugins. A new path
field was added to Module
and modulePath()
now checks that value if set. Check plugins need to specifically support root-level modules by setting path
to .
, currently only the docker-compose plugin implements this.
Flat git repositories should be supported (as per https://github.com/monasca/pr-bot/blob/afdf55ab7fbec2af367144f020b86900d6646cd4/lib/repository/git.js#L305).
'flat' in this case would mean a single module in a repository, presumably not in a subdirectory. Most single-project repositories (not like monasca-docker) are built like this, including the pr-bot repo itself.