feat: Allow to use GitHub search to target multipe GitHub repositories #6422
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Adding a new scm of kind "githubsearch".
It's a new scm kind that apply Updatecli manifest on every GitHub repositories discovered by a GitHub search query
Technically speaking, it generates
githubscm using the GitHub advance search query beforeHere is an example
updatecli.yaml
Then you can run
I made this Updatecli policy that can be used for testing.
This policy parses Rancher GitHub repositories and git branch to identify what files relies on a Golang version that
should be updated.
using
Test
To test this pull request, you can run the following commands:
Additional Information
Checklist
Tradeoff
I made the decision to create a new scm kind "githubsearch" instead of reusing the kind "github"
Even thought the parameters are almost the same, I think it's better from a UX perspective
githubrequires the parametersownerandrepositorygithubsearchrequires the parameterssearchand doesn't supportowner/repositoryThis slightly difference allows the schema validation to trigger an error if we are missing either the
searchparameter or theownerandrepositoryparameterPlease that the kind
githubsearchcan achieve the same result using the searchrepo:owner/repositoryPotential improvement