Skip to content

observe: a GitLab subgroup project is reported as its parent group (ownerName drops the project name) #265

Closed

Description

@FredApps

What went wrong?

For a GitLab project inside a subgroup, the observation report's repository.ownerName drops the project name. With CI_PROJECT_PATH=group/sub/project, the report says ownerName: "group/sub", so every project in group/sub reports the same repository name.

readGitlabEnvironment (packages/diffci-cli/src/client/context.ts, line 82) reads the full CI_PROJECT_PATH, and docs/design/gitlab-component.md maps ownerName to CI_PROJECT_PATH. observe (packages/diffci-cli/src/client/observe.ts, line 162) then splits it on / and keeps only the first two segments:

const [owner, name] = (ci.ownerName ?? "").split("/");
...
ownerName: owner && name ? `${owner}/${name}` : undefined,

telemetry.ts already uses the full CI_PROJECT_PATH for the repository name.

DiffCI version

main at 40aa308

Command you ran

In a GitLab CI job for a project in a subgroup (simulated locally):

GITLAB_CI=true CI_PROJECT_PATH=group/sub/project diffci observe --json

Environment

GitLab CI (simulated), Linux, Node 24.

Output

"repository": { "provider": "gitlab", "ownerName": "group/sub", ... }

What you expected

"repository": { "provider": "gitlab", "ownerName": "group/sub/project", ... }

If the ingest side expects exactly two segments, it would need to accept the longer GitLab path as well; I could not check the server from this repository.

Activity

  1. added a commit that references this issue on Nov 18, 2026
    a0972e3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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