Skip to content

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

@foot

Description

@foot

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions