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

Support sub-groups and sub-sub-groups on gitlab #183

Open
foot opened this issue Jan 30, 2023 · 0 comments
Open

Support sub-groups and sub-sub-groups on gitlab #183

foot opened this issue Jan 30, 2023 · 0 comments

Comments

@foot
Copy link
Collaborator

foot commented Jan 30, 2023

When the gitlab provider was intro'd we accidentally copy-pasted a constraint from the github provider that validates and rejects subgroups (makes sense for github, not gitlab)

https://github.com/fluxcd/go-git-providers/pull/51/files#diff-4404cc5156273f46bd72ef805e119d1ed8ff3486f164274ab32611fb99dd1452R202

You can workaround this check in code calling ggp with

    // Add the subgroups
    ref.Organization = strings.Join(append([]string{ref.Organization}, ref.SubOrganizations...), "/")
    ref.SubOrganizations = nil

before using the ref to do something. At least these methods work fine:

  • GetRepo
  • CreateBranch
  • CreateCommit
  • CreatePullRequest

We should

  1. remove the check in the validation.
  2. Either reflect the suborgs in the org as above, or take the suborgs into account when doing requests.
@foot foot changed the title Support sub-groups on gitlab Support sub-sub-groups on gitlab Jan 30, 2023
@foot foot changed the title Support sub-sub-groups on gitlab Support sub-groups and sub-sub-groups on gitlab Jan 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant