gitlab4j-api icon indicating copy to clipboard operation
gitlab4j-api copied to clipboard

Test groups shared with groups / Group details

Open imsoftware opened this issue 5 years ago • 1 comments

Hey, i want to share a group with a group (like #587) and test it with a unit test.

Unfortunately getGroup (http://www.messners.com/gitlab4j-api/javadocs/org/gitlab4j/api/GroupApi.html#getGroup-java.lang.Object-) does not return the details of a group ("shared_with_groups", https://docs.gitlab.com/ce/api/groups.html#details-of-a-group) just like group.class (http://www.messners.com/gitlab4j-api/javadocs/org/gitlab4j/api/models/Group.html).

Can you add "shared_with_groups" to to getGroup and group.class?

Or do you have an good idea how i can test that a group has been shared successful except of the 200 OK response?

See Gitlab Docs and Javadocs

  • https://docs.gitlab.com/ce/api/groups.html#details-of-a-group
  • https://docs.gitlab.com/ce/api/groups.html#share-groups-with-groups
  • http://www.messners.com/gitlab4j-api/javadocs/org/gitlab4j/api/GroupApi.html#getGroup-java.lang.Object-
  • (http://www.messners.com/gitlab4j-api/javadocs/org/gitlab4j/api/models/Group.html

Thank you!

imsoftware avatar Jan 13 '21 22:01 imsoftware

GitLab has its own endpoint for that, see: https://docs.gitlab.com/api/groups/#list-shared-groups

Though this Endpoint isn't implemented jet. Created an Issue and Pull Request: https://github.com/gitlab4j/gitlab4j-api/issues/1289

ysemko avatar Oct 01 '25 12:10 ysemko