Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Org Repositories Missing security_and_analysis Member #2959

Closed
squatched opened this issue Apr 28, 2024 · 0 comments · Fixed by #2960
Closed

Org Repositories Missing security_and_analysis Member #2959

squatched opened this issue Apr 28, 2024 · 0 comments · Fixed by #2960

Comments

@squatched
Copy link
Contributor

When getting organization repositories, there is a security_and_analysis member with 3x feature flags included. This is not included in the resulting Repo object.

Github Ref: https://docs.github.com/en/rest/repos/repos?apiVersion=2022-11-28#list-organization-repositories

Something like this is expected:

repo = github.Github().get_organization("my_org").get_repo("my_repo")

assert repo.security_and_analysis.advanced_security.status == "enabled"
assert repo.security_and_analysis.secret_scanning.status == "enabled"
assert repo.security_and_analysis.secret_scanning_push_protection.status == "enabled"
squatched added a commit to squatched/PyGithub that referenced this issue Apr 28, 2024
github-merge-queue bot pushed a commit that referenced this issue May 28, 2024
Fixes #2959 by adding a new SecurityAndAnalysis object to Repository.
Currently, it simply has some feature flags that are either set to
"enabled" or "disabled" so made a SecurityAndAnalysisFeature object and
reused it across all the features.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant