pipelines-as-code
pipelines-as-code copied to clipboard
how to configure existing repositories in a github org?
https://github.com/openshift-pipelines/pipelines-as-code/pull/890 with this pull req we allow user to enable auto configure new repos but how do we support configuring existing repos in the org.
few of the ways discussed in the comments https://github.com/openshift-pipelines/pipelines-as-code/pull/890#issuecomment-1284863422
we have 2 ways now...
if auto configure is enabled then list all repos which are attached to github app.. (I guess there should be some api) and then create repository Cr for it. or when we get event from that repo, and we don't find a any repository cr for it. we create one. (not secure but we will have to check where the event is coming from using some regex/org name)
and https://github.com/openshift-pipelines/pipelines-as-code/pull/890#issuecomment-1285036911
(about importing existing repo since this PR handles only newly created repos). maybe having a import flag in the CLI could solve this, it will : tkn pac import organisation org will go over every repos in the org organisation and create a namespace/repo using a template. this could be used as well for other git providers too,
@chmouel whats the priority on this?
maybe having this command letting do a batch import would be useful even for non auto creation,
It would be nice from my perspective, if any form of batch import can be expressed in GitOps compatible form. This means, that repository CRs might be created on the filesystem as an alternative to just in-cluster. Especially since additional features on this CR like custom parameters seemed to be merged recently.