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

Use repository metadata search as input for target repository list #398

Closed
jamestelfer opened this issue Oct 24, 2023 · 1 comment · Fixed by #397
Closed

Use repository metadata search as input for target repository list #398

jamestelfer opened this issue Oct 24, 2023 · 1 comment · Fixed by #397
Labels
bug Something isn't working

Comments

@jamestelfer
Copy link
Contributor

jamestelfer commented Oct 24, 2023

I mostly use GitHub, so my suggestion is based around that ecosystem.

At the moment, the source of the list of repositories to alter is either (a) everything owned by a user/organisation, or (b) a specific set of repositories.

What I often do is use a GitHub code or repository search to find the set of target repositories first, then feed that into multi-gitter.

I propose adding a --repo-search flag (GitHub only, initially) that would use the flag as an SCM-specific search query that would gather the set of target repositories. The syntax accepted by the flag would be that supported by the underlying SCM, and would be passed through directly.

Example searches:

  • partial names with boolean queries: owner:buildkite-plugins in:name docker AND plugin
  • one or multiple owners owner:cultureamp owner:jamestelfer fork:true in:name plugin

Key drawback to this approach is that it is possible that it is not consistent across executions, making it potentially tricky for commands like merge or status. Ultimately there is some level of similar potential for instability in existing options like --topic, but it's worth calling out.

In my use I tend to work with this by ensuring that the PRs created have a set of tags to make status and merging easy to query by other means. In GitHub, searching by the PR's base branch or tags is quite straightforward, allowing PRs created by multiple runs of multi-gitter to be tracked and updated as a group.

Relevant GitHub documentation:

The initial discussion centred around using code search. This is a common use case for me (finding which repositories reference a certain library, or use a method/idiom that we're targeting for evolution).

@github-actions
Copy link
Contributor

Included in release v0.48.0 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant