Skip to content

Missing shared_with_groups property on Project and Group models #1104

Description

@JasonMouwen

Description

The GitLab REST API returns a shared_with_groups array on both the
project (GET /projects/:id) and group (GET /groups/:id) responses,
but this property is not mapped in NGitLab.Models.Project or
NGitLab.Models.Group. As a result, consumers can't see which groups a
project/group has been shared with.

API reference

Example payload

"shared_with_groups": [
  {
    "group_id": 4,
    "group_name": "Twitter",
    "group_full_path": "twitter",
    "group_access_level": 30,
    "expires_at": null
  }
]

Proposed change

  • Add a new model type (e.g. SharedWithGroup) mapping group_id,
    group_name, group_full_path, group_access_level and expires_at.
  • Add [JsonPropertyName("shared_with_groups")] public SharedWithGroup[] SharedWithGroups { get; set; }
    to both Project and Group.
  • Mirror this in NGitLab.Mock and add tests.

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