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

Exclude projects by tag during sync #83

Closed
aayushsrivastava opened this issue Aug 22, 2024 · 5 comments
Closed

Exclude projects by tag during sync #83

aayushsrivastava opened this issue Aug 22, 2024 · 5 comments
Labels
enhancement New feature or request

Comments

@aayushsrivastava
Copy link

Is your feature request related to a problem? Please describe

I have a use case where I want to clone all projects except a few.

I thought of a few ways out like tagging all the other projects besides the excluded ones with a particular tag and using this tag during sync. It makes it difficult to maintain the config though since the excluded projects are fewer in number and will remain static in count. Whereas this new tag has to be now added for any new project.

Describe the solution you'd like

A new flag --exclude-tags which ignores the projects with such tags while cloning repositories.

Additional context

N/A

@aayushsrivastava aayushsrivastava added the enhancement New feature or request label Aug 22, 2024
@alajmo
Copy link
Owner

alajmo commented Aug 22, 2024

There's a field you can set on individual projects, named sync, which if set to false, will not sync the project.

projects:
  pinto:
    path: frontend/pinto
    url: git@github.com:alajmo/pinto
    tags: [dev]
    sync: false

There's no dynamic flag for this though, but feel free to open up a PR implementing it (I'm bottlenecked at the moment, but can check PRs), it shouldn't require too much work, the function for filtering is FilterProjects.

@aayushsrivastava
Copy link
Author

I missed this field somehow! Thanks for pointing it out. This does solve my problem.

@aayushsrivastava
Copy link
Author

We think it will be helpful to have an additional CLI override to sync projects with sync: false. Something like mani sync --all syncs all projects irrespective of the sync flag's value.

Willing to contribute a PR for the same. Would you be interested in such an addition?

@alajmo
Copy link
Owner

alajmo commented Aug 26, 2024

I thought about it, sounds like a good idea. Feel free to open a PR!

@alajmo
Copy link
Owner

alajmo commented Dec 25, 2024

It's been added now as part of 0.30.0, to ignore the sync state of projects that have sync set to false, use the flag --ignore-sync-state.

@alajmo alajmo closed this as completed Dec 25, 2024
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