Skip to content

Namespace.self_and_hierarchy scope

Return all ancestors and descendants for a set of nodes. The solution is quite straight forward:

Namespace.from_union([groups_a.self_and_ancestors, groups_b.self_and_descendants])

This will replace all single argument calls to Gitlab::ObjectHierarchy#all_objects. The all_objects calls are currently being replaced.