0

Prevent-Public-Repos Probot App Not changing repo to private

So far I have adjusted the parameters and tested various combinations of values. From what I can see on my Github Enterprise account (we are using cloud) is there is a new repository status of Internal -- no longer Public / Private. I am wondering if this is breaking the API call to change this repo back to Private.


# Turn on Monitor Mode. In this mode the repo visibility is not modified and only an Issue is created
monitorOnly: false

# Enables detection of repos that change visibility from private to public (not just newly created ones)
enablePrivateToPublic: false

We are getting issues created alerting us about the status of our test repo changing from Private to Public. The last method changeVisibility() just doesn't seem to execute properly.

CBD
  • 1

1 Answers1

0

I finally figured this out and created an issue on the project. https://github.com/issc29/probot-prevent-public-repos/issues/14

A modified answer for those who don't want to click the above ticket.

  1. I needed to enable who can adjust Repository visibility for the organization, this isn't in the instructions, README.md, for setting up this project and, probably, should be listed as a step in Get Started with some type of mention like, "Verify the permission to 'Allow member to change repository visibilities for this organization' is selected in Member Privileges"
  2. The value for enablePrivateToPublic: false should be set to true and not false. The text above this line is a bit confusing. It should get clarified, or possibly, change the name of this variable, which would break backwards compatibility. Maybe add additional comments to to clarify, e.g.,:
# Enables detection of repos that change visibility from private to public (not just newly created ones)
# true -- will prevent a Private repo from transitioning to Public scope, unless this repository is listed in the excludeRepos list below
# false -- will allow a Private repo to transition to Public scope and only create an issue about this transition
CBD
  • 1