On Thu, Aug 01, 2019 at 10:10:24AM +0200, Michael Kesper wrote:
> Hi all,
>
> On 27.07.19 20:11, Ian Jackson wrote:
> > Bastian Blank writes ("Re: Salsa.d.o: Please support the implementation request for a global config option to change the default for "Custom CI config path" in Gitlab"):
> >> The setting is per project, so it is available. For now I say that
> >> changing this globally is too disruptive.
>
> Could you please elaborate why you think so?
>
> >> But as I wanted to try this something: Please describe why we _should not_
> >> set such an option globally. This is just helping to see if you
> >> understand both sides.
> >
> > The main downside I can think of making this change is that existing
> > salsa gitlab ci users will have to either rename their file
> > (preferred) or change their repo config.
>
> I think as it's only a default, it should not influence already set values?
The problem will be in the projects that already rely on the default
configuration.
>
> My 2 cents
> Michael
>
But making a transition were the default is set for all projects that
has not specific configuration may be possible and not disruptive.
Just an idea:
```
import gitlab
cli = gitlab.Gitlab('https://salsa.debian.org', private_token=private_token)
cli.auth()
for project in cli.projects.list():
if project.ci_config_path is None:
project.ci_config_path = '.gitlab-ci.yml'
project.save()
```
Joa
Attachment:
signature.asc
Description: PGP signature