github-api
github-api copied to clipboard
Should support `parent` team objects
In GHTeam
objects, there should be support exposing the result of the parent
return from /user/teams
.
Ideally this would be another GHTeam
object, and bonus points if getMyTeams()
[1] supports fetching all parents as well (possibly with an arg for consumers to request that functionality).
A clear and concise description of what the bug is.
Expected behavior A clear and concise description of what you expected to happen.
.getMyTeams()
returns an GHTeam
objects with references to their parent team.
Bonus: .getMyTeams(True)
(or some such) gets not only my direct teams, but any parent teams I'm a part of.
[1] - https://github.com/hub4j/github-api/blob/4bba9680706785d6385ed69243f41a5f36757463/src/main/java/org/kohsuke/github/GitHub.java#L870
** Extra Context **
The lack of parent
being exposed makes https://issues.jenkins.io/browse/JENKINS-63051 harder to solve.
@Callek If you can implement a PR (even without tests) it would be helpful for understanding what it is that you're suggesting.