Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Provide a way to add projects. #43

Open
mikelane opened this issue Aug 5, 2022 · 1 comment
Open

Provide a way to add projects. #43

mikelane opened this issue Aug 5, 2022 · 1 comment
Labels
enhancement New feature or request

Comments

@mikelane
Copy link

mikelane commented Aug 5, 2022

Is your feature request related to a problem? Please describe

Not a problem, but a missing feature

Describe the solution you'd like

As a mani user, I would like to be able to create new projects without manually modifying the yaml file.

Feature: Add new projects already to an existing mani yaml
    Background:
        Given there is an existing mani repository

    Scenario: Add to an existing mani repository
        Given I have cloned a new project in a subdirectory of the mani repository
        When I run the mani sync projects command
        Then the mani repository is updated with the new project

    Scenario: Use mani cli to check out project
        Given there is a project that I can clone
        When I use the mani clone project command
        Then the mani repository is updated with the cloned project

Additional context

Another related feature is removing a project, I suppose, but I'll leave that for another feature request. I'm purposefully not being prescriptive in the scenario definitions above. I'm not sure what cli commands would fit in best with the existing cli or your way of doing things. Maybe something like: mani sync --projects is an option for the first scenario? That might get confusing with mani sync though. Maybe mani update-projects? Or if there is some use case for many different kinds of updates, then mani update --projects?

The second scenario might be a bit of a stretch, I suppose. mani checkout --github=mikelane/amazing-repo-name might work? That might end up causing you a lot of work, though. I wonder if you could tie into exec... so like mani exec gh repo clone mikelane/amazing-repo-name and then have mani recognize that it needs to update the yaml file?

@mikelane mikelane added the enhancement New feature or request label Aug 5, 2022
@alajmo
Copy link
Owner

alajmo commented Aug 15, 2022

I actually tried to implement this at the early stages of mani but I didn't find any YAML parser (not sure there is any) that preserves comments and newlines. Also, one would need to determine where the project is added since mani supports multiple config files (you can define projects in multiple config files and import them).

So I decided to put it on hold or even not implement it because of the added complexity, as well as the fact you rarely add new projects. It isn't something you do every day, so it's quite easy to copy-paste some lines in a mani.yaml file and just change the name/url and then run mani sync.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants