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

feat: add repository pages public attribute #1112

Closed
wants to merge 8 commits into from

Conversation

btkostner
Copy link
Contributor

This adds a public attribute to repository pages. This controls the accessibility of pages. See the GitHub API docs for more information. Here is the code in go-github. Closes #1045

Note: I'm not a golang programmer, so I'm not 100% sure this is everything that is required

@btkostner
Copy link
Contributor Author

Bump. This would be very helpful for our enterprise hosting static sites. As of right now, manually setting this field breaks any terraform runs after.

Copy link
Member

@kfcampbell kfcampbell left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@btkostner sorry for the delay! Somehow I hadn't seen this yet. Would it be possible to alter the test(s) for this resource to include this new functionality? I'm thinking of some kind of addition of an appropriate test in this file.

}
`, randomID)

check := resource.ComposeTestCheckFunc(
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for adding a test to capture this behavior! Is this check passing for you? When I run it, I'm getting Check failed: Check 1/1 error: github_repository.test: Attribute 'pages.0.public' expected "false", got "true".

It looks like we're only getting the "public" option, never setting it anywhere. Wouldn't we need some logic in the Create and Update functions to set this attribute?

Copy link

👋 Hey Friends, this pull request has been automatically marked as stale because it has no recent activity. It will be closed if no further activity occurs. Please add the Status: Pinned label if you feel that this issue needs to remain open/active. Thank you for your contributions and help in keeping things tidy!

@github-actions github-actions bot added the Status: Stale Used by stalebot to clean house label Jan 10, 2024
@github-actions github-actions bot closed this Jan 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Stale Used by stalebot to clean house
Projects
None yet
Development

Successfully merging this pull request may close these issues.

feature request: Add support for 'public' attribute on github pages configuration
2 participants