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

How do I add projects with the same name for the GitLab module? #566

Closed
AndrewCarterUK opened this issue Aug 29, 2019 · 6 comments · Fixed by #617
Closed

How do I add projects with the same name for the GitLab module? #566

AndrewCarterUK opened this issue Aug 29, 2019 · 6 comments · Fixed by #617
Labels
🐛 bug "Houston, we've had a problem."

Comments

@AndrewCarterUK
Copy link

How can we help?

The documentation uses a key value pair, where the key is the name of the repository and the value is the namespace.

We have a few projects that use api as a slug for the name, and are differentiated by their namespace.

For example:

gitlab.com/our-company/customer-1/shopping-site/api
gitlab.com/our-company/customer-2/phone-app/api

With the GitLab module, these both have a key of API so can't be represented in YAML (I think?).

@senorprogrammer senorprogrammer added the 🐛 bug "Houston, we've had a problem." label Aug 30, 2019
@senorprogrammer
Copy link
Collaborator

Yeah, this is definitely problematic. I think a better approach would be to have:

    projects:
      namespace-a:
      - project-name-1
      - project-name-2
      namespace-b:
      - project-name-1
      - project-name-3

@AndrewCarterUK
Copy link
Author

I managed to find a workaround, as I can do:

projects:
    "customer-1/shopping-site/api": "our-company"
    "customer-2/phone-app/api": "our-company"

But it feels a bit messy!

@Seanstoppable
Copy link
Collaborator

Seanstoppable commented Sep 6, 2019

I think fully qualified namespace actually makes sense, rather than trying to figure out the right thing.
My other suggestion would have been to support a list of paths, and have it work more like github. I.e. it would look like the following, and split on the first /:

projects:
  - "our-company/customer-2/phone-app/api"
  - "our-company/customer-1/shopping-site/api"

@senorprogrammer
Copy link
Collaborator

Yep, I have a PR in the works that will do exactly this ^ for the GitLab module. Should be merged into master by Monday morning.

@senorprogrammer
Copy link
Collaborator

@AndrewCarterUK if you want to give this branch a try, it should solve your issue. You should now be able to configure GitLab projects as a list as @Seanstoppable describes above.

@senorprogrammer
Copy link
Collaborator

This has been merged into master and will be part of the next release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 bug "Houston, we've had a problem."
Development

Successfully merging a pull request may close this issue.

3 participants