Skip to content

Commit

Permalink
Add GHOrganization.listSecurityManagers()
Browse files Browse the repository at this point in the history
Add support to list Security Managers in a GitHub Organization.
  • Loading branch information
kozmic committed Apr 12, 2024
1 parent 6b2a487 commit d0db081
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions src/main/java/org/kohsuke/github/GHOrganization.java
Expand Up @@ -378,6 +378,19 @@ private PagedIterable<GHUser> listMembers(final String suffix, final String filt
.toIterable(GHUser[].class, null);
}

/**
* List up all the security managers.
*
* @return the paged iterable
* @throws IOException
* the io exception
*/
public PagedIterable<GHTeam> listSecurityManagers() throws IOException {
return root().createRequest()
.withUrlPath(String.format("/orgs/%s/security-managers", login))
.toIterable(GHTeam[].class, item -> item.wrapUp(this));

Check warning on line 391 in src/main/java/org/kohsuke/github/GHOrganization.java

View check run for this annotation

Codecov / codecov/patch

src/main/java/org/kohsuke/github/GHOrganization.java#L389-L391

Added lines #L389 - L391 were not covered by tests
}

/**
* Conceals the membership.
*
Expand Down

0 comments on commit d0db081

Please sign in to comment.