multi-gitter icon indicating copy to clipboard operation
multi-gitter copied to clipboard

Feature request: Dynamic repository list support

Open caquino opened this issue 1 month ago • 2 comments

The feature request To simplify management in large GitHub organisations, it would be desirable to support dynamically populating the repository list via one or more of the following options: an external script, an external file, or GitHub repository properties.

Currently, the -R option is used to pass repositories that are within scope to apply changes, and if multiple repositories are needed, you use the -R option numerous times.

Obviously, it is possible to generate the command line dynamically using a script, but this leads to a command line with hundreds, or even thousands, of -R options.

Sadly, the --repo-search option does not work because not all search functionality supports custom properties at the moment.

It would be great if we supported some other options for the repository list, for example:

-RS <script file name> for script-based population, where the user can provide a script in any language they want; the only requirement is that the script will write to stdout the list of repositories one per line.

-RP name=value for GitHub repository custom properties population, where this would be used as a filter to determine which repositories should have the configuration applied.

The second option is a bit more complicated: you cannot search for repositories with custom properties, so you must query each repository individually for its custom properties, which may lead to problems.

-RF <repository list file> allows you to provide a text file with a list of repositories, one per line, which is simpler than the other two options and moves the complexity onto the user to solve.

Or to use something similar to how curl handle files, where we could still user -R but if you prefix the repository with @ it will hold it as a file instead of a single repository name -R @my-repository-list.txt this would be possible because as far as I am aware you cannot use @ on repository names.

My use case

As an org admin, I would like to have an easy way to mass manage hundreds or thousands of repositories at once without needing to have the -R argument duplication, which is error-prone and hard to troubleshoot.

Implementation

  • [X] I would like to contribute this feature if it's a suitable addition to multi-gitter
  • [ ] I have no intention of adding this feature myself.

I'm happy to try to contribute the feature but I would like first to understand if this is something maintainers agreed should be implemented and which of the options should be implemented.

caquino avatar Nov 27 '25 11:11 caquino

To be able to filter on custom properties would be useful and a PR there would be welcome. Tag filtering already exist, which might also be used similarly.

For a list of repos. Is using a config file not sufficient?:

list-of-repos.yaml:

repo:
  - my-org/js-repo
  - other-org/python-repo
  - ...
multi-gitter run ./your-script.sh --config=list-of-repos.yaml

lindell avatar Nov 27 '25 15:11 lindell

Thanks, @lindell, that actually makes sense. I completely missed that I could do that.

I will try to carve out some time to take a look at the tag filtering and see if I can expand the functionality to support custom properties.

caquino avatar Nov 27 '25 22:11 caquino