NiklasRosenstein / flux-ci

Flux is your own private & lightweight CI server.
MIT License
26 stars 10 forks source link

Allow arbitrary repository names? #49

Open NiklasRosenstein opened 6 years ago

NiklasRosenstein commented 6 years ago

The repository name is currently enforced to match the format owner/repo. This is to identify the repository on a push event from a Git hosting server. The name must exactly match the owner/name from the push event.

However, I think this may actually be a little bit unintuitive. I had to check the code to figure out why again I enforced this naming scheme, and the sole reason is the push event identification.

Since every repository has a "secret" that the Git server sends with the push event, maybe could identify the repository that the push event is for by that string instead. In that case however, we should enforce automatically generated secret in order to prevent (unlikely but possible) collisisions with the secret of another repository.

tvrzna commented 6 years ago

Don't forget that "secret" is just optional configuration and some services (Bitbucket cloud) do not support secrets.

gsantner commented 6 years ago

probably by the reason of flux-ci having multiple user support - for each manging his own jobs/repos - VS jenkins with one global job space

NiklasRosenstein commented 6 years ago

Don't forget that "secret" is just optional configuration and some services (Bitbucket cloud) do not support secrets.

Oh well that sucks. Gotta check out the payload maybe there's some other way to identify the repository other than by its name. Otherwise maybe we have to compare the URL of the repository.

probably by the reason of flux-ci having multiple user support - for each manging his own jobs/repos - VS jenkins with one global job space

Yes Flux was intended for multiple users, but currently repository names are global. Different users should be able to have repositories set up with the same name.

gsantner commented 6 years ago

Other Services e.g. go for just id and do user/projectname association to ID seperatly