Drone

Drone cannot parse sub-group project path

Hello.

I am trying to use Drone with GitLab.
There are some projects belonging to sub-group, such as foo/bar/sample, foo/bar/core in my GitLab.
Syncrhronizing repositories on Drone UI, it seems to be done but it has some errors.

The errors are below.

foo/bar/sample is parsed to bar/sample.
foo/bar/core is parsed to bar/core.

I think that the last two parts of repository name are parsed and used on Drone.

As I know, Drone has been developed based on GitHub not GitLab.
GitHub doesn’t support sub-group path, including slash character and so it seems that slash is not considered as repository name.

Note: Related to [GitLab] Drone confused by subgroups

I dig into the reason to solve.

I checked Drone source codes, GitLab API documentation.

As I checked source code, https://github.com/drone/go-scm has some issues related to this bug.
The source code that have problems is below.

GitLab API response about foo/bar/sample project is below.
https://docs.gitlab.com/ee/api/projects.html#list-all-projects

[
  {
    "id": 1000,
    "name": "sample",
    "path": "sample",
    "path_with_namespace": "foo/bar/sample",
    "namespace": {
      "id": 256,
      "name": "bar",
      "path": "bar",
      "kind": "group",
      "full_path": "foo/bar",
      "parent_id": 14
    },

The important source code lines are below.

		Namespace: from.Namespace.Path,
		Name:      from.Path,

namespace.full_path should been used as Drone Namespace instead of namespace.path.

What do you think of using namespace.full_path?

I think this requires significant changes to the system. See this issue.

If drone doesn’t support subgroup, it means that drone doesn’t fully support GitLab.
And so it must be written somewhere in the document to prevent from confusing.

To say that drone support GitLab, this issue must be solved as I think.

Until when will this issue pending?

I agree that Drone does not fully support GitLab as there are no plans to implement support for subgroups at this time. We will document this limitation accordingly.