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

fix(resource_github_repository): Create repo from template with visibility to avoid org policy issue #2151

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

littlelionking
Copy link

@littlelionking littlelionking commented Feb 16, 2024

Resolves #925


Before the change?

When creating a repository from a template, it sets the visibility to either public or private according to this bool:

Private:            github.Bool(isPrivate),

And then edits the repo settings later to ensure the visibility is correct.

After the change?

Now it sets the Visibility parameter instead, allowing "internal" as an option.

Pull request checklist

  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been reviewed and added / updated if needed (for bug fixes / features)

Does this introduce a breaking change?

Please see our docs on breaking changes to help!

  • No

Previously, when creating a repository from a template,
it sets the visibility to either `Public` or `Private` and then
edits the repo settings later to ensure the visibility is correct.
Now it sets the `Visibility` parameter instead.
@littlelionking littlelionking marked this pull request as ready for review February 16, 2024 02:40
@littlelionking littlelionking changed the title Allow creating a repo from template to set visibility to INTERNAL fix(resource_github_repository): Create repo from template with visibility toavoid org policy issue Feb 19, 2024
@littlelionking littlelionking changed the title fix(resource_github_repository): Create repo from template with visibility toavoid org policy issue fix(resource_github_repository): Create repo from template with visibility to avoid org policy issue Feb 19, 2024
@littlelionking
Copy link
Author

I didn't see a way to set Allow members to change repository visibilities for this organization. for tests and so I did not add any tests.

@littlelionking
Copy link
Author

Hi @kfcampbell would I be able to get your thoughts on this?

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 this pull request may close these issues.

Failed setting visibility=internal on a newly created repo from template
1 participant