hub4j / github-api

Java API for GitHub
https://github-api.kohsuke.org/
MIT License
1.12k stars 718 forks source link

Add GHOrganization.listSecurityManagers() #1832

Closed kozmic closed 1 month ago

kozmic commented 3 months ago

Description

Add support to list Security Managers in a GitHub Organization. See GitHub's API doc for this API for more details about this API.

Tests:

If I'm given access to the hub4j-test-org Org, including permission to create a team and configure that team as a Security Manager team (or someone else can set this up for me), I can include an integration test (I didn't find a step-by-step process in CONTRIBUTING.md to get this access.

Before submitting a PR:

When creating a PR:

codecov[bot] commented 2 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 81.03%. Comparing base (c2ac4b0) to head (92112af). Report is 2 commits behind head on main.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #1832 +/- ## ========================================= Coverage 81.03% 81.03% - Complexity 2409 2411 +2 ========================================= Files 233 233 Lines 7344 7347 +3 Branches 399 399 ========================================= + Hits 5951 5954 +3 Misses 1148 1148 Partials 245 245 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

kozmic commented 2 months ago

@bitwiseman : I would love to, but you need to add me to the test org so I can add a security maanger to run the tests against. Or is a unit test good enough for you?

From the description of this PR:

If I'm given access to the hub4j-test-org Org, including permission to create a team and configure that team as a Security Manager team (or someone else can set this up for me), I can include an integration test (I didn't find a step-by-step process in CONTRIBUTING.md to get this access.

kozmic commented 2 months ago

@bitwiseman : I've added test response files that I've manually created and created unit tests based on those. Let me know if you want me to have real files from your test org, then you need to add me with permission to add a security team to the test org (or you can do it, and give me read access).

kozmic commented 2 months ago

@bitwiseman : Could you take a look at this?