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

Enable or disable Secret Scanning for a repository #2204

Closed
yogur opened this issue Nov 15, 2021 · 2 comments
Closed

Enable or disable Secret Scanning for a repository #2204

yogur opened this issue Nov 15, 2021 · 2 comments

Comments

@yogur
Copy link
Contributor

yogur commented Nov 15, 2021

The library doesn't seem to support enabling or disabling Secret Scanning. This is doable through the REST API by sending a PATCH request and setting the status in the object secret_scanning to enabled or disabled. https://docs.github.com/en/rest/reference/repos#update-a-repository

Is this planned to be added to the library?

@gmlewis
Copy link
Collaborator

gmlewis commented Nov 15, 2021

I believe this was recently added in #2133:
https://github.com/google/go-github/blob/master/github/repos.go#L193

@yogur
Copy link
Contributor Author

yogur commented Nov 15, 2021

Thanks @gmlewis! I just noticed I was searching in the v34 codebase. 🤦🏻

@yogur yogur closed this as completed Nov 15, 2021
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

No branches or pull requests

2 participants