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

Allow to integrate multiple gitlabs #10

Open
kaystrobach opened this issue Mar 2, 2015 · 4 comments
Open

Allow to integrate multiple gitlabs #10

kaystrobach opened this issue Mar 2, 2015 · 4 comments

Comments

@kaystrobach
Copy link

would be really awesome to change the code to allow access multiple gitlab instances.

IMHO there are several steps to take:

  • convert settings file form ini to yaml
  • iterate over instances and then repos to get the needed information
  • put all the stuff into one file

The yaml file may look like:

m4tthumphrey:
  php-gitlab-api:
    instances:
      -
        apiToken: 'ASDFGHJKL12345678'
        endpointUri: 'http://gitlab.example.com/api/v3/'
      -
        apiToken: 'ASDFGHJKL12345678'
        endpointUri: 'http://gitlab.example.com/api/v3/'
      -
        apiToken: 'ASDFGHJKL12345678'
        endpointUri: 'http://gitlab.example.com/api/v3/'

@kaystrobach
Copy link
Author

yaml files can be read easily within PHP with http://php.net/manual/de/function.yaml-parse-file.php

@lemoinem
Copy link
Contributor

I think the major conceptual issue would be in case of name collision (What to do if two packages in first and second Gitlab have the same name?).

I see two options:

  • priority-based (the one in the second Gitlab will be ignored)
  • prefix-based (either the one in the second Gitlab or both are prefixed).

To parse YAML, I think https://github.com/symfony/Yaml would be a better option.

@lemoinem lemoinem changed the title allow to integrate multiple gitlabs [WIP] allow to integrate multiple gitlabs Aug 26, 2015
@kaystrobach
Copy link
Author

  • symfony yaml internally uses the php parser if available ... but that's not important for me
  • if there is a collision, then the first one wins, that's how it normally works ...

Same would happen, if you setup multiple instances of gitlab-composer with different gitlabs and use both into one composer.json :D

@lemoinem lemoinem changed the title [WIP] allow to integrate multiple gitlabs Allow to integrate multiple gitlabs Aug 26, 2015
@lemoinem
Copy link
Contributor

Sounds good to me. We will try to provide an implementation for this ASAP.
Of course, a PR is always welcome ;)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants