-
Notifications
You must be signed in to change notification settings - Fork 763
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
Visibility #441
Visibility #441
Conversation
0692569
to
2219149
Compare
2219149
to
756f4ce
Compare
@patrickmarabeas this looks great! when you get a chance you can also now rebase to use the updated |
756f4ce
to
2e36caa
Compare
Comments resolved, and commits rebased @anGie44. |
awesome, thanks for pushing up changes @patrickmarabeas! do you mind adding test coverage for the attribute as well? forgot to mention it when I made my initial comments..otherwise changes LGTM 👍 |
2e36caa
to
27211a8
Compare
@anGie44 I've included mention of the property in the tests, but not sure how much more can be done since testing is only done within public orgs... This looks to have the same degree of "testing" as the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@patrickmarabeas thank you! running the tests locally tho, I realized you'll have to also add the Visibility attribute in the Check functions like:
testAccCheckGithubRepositoryAttributes(&repo, &testAccGithubRepositoryExpectedAttributes{
Visibility: "public",
...
}
re: more test coverage, the only edge case i considered "testing" would be to set conflicting params (e.g. visibility=public
and private=true
) to ensure the visibility
param overrides but i don't think it'd add much value as I don't see it being a typical practitioner's user error.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@patrickmarabeas thank you! running the tests locally tho, I realized you'll have to also add the Visibility attribute in the Check functions like:
testAccCheckGithubRepositoryAttributes(&repo, &testAccGithubRepositoryExpectedAttributes{
Visibility: "public",
...
}
re: more test coverage, the only edge case i considered "testing" would be to set conflicting params (e.g. visibility=public
and private=true
) to ensure the visibility
param overrides but i don't think it'd add much value as I don't see it being a typical practitioner's user error.
27211a8
to
57fd0b5
Compare
Adds the additional visibility parameter allowing for enterprise accounts to set the repository to be only internally visible. Resolves integrations#304
Adds the additional visibility parameter allowing for enterprise accounts to have set the repository to be only internally visible. Resolves integrations#304
57fd0b5
to
04675fd
Compare
Added I don't think testing that edge case should be necessary, as that's just testing the API, not the provider. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks so much @patrickmarabeas! changes and test results look good 🚀
Output of (GithubRepository) acceptance tests:
--- PASS: TestAccGithubRepository_hasProjects (6.15s)
--- PASS: TestAccGithubRepository_templates (6.90s)
--- PASS: TestAccGithubRepository_basic (12.63s)
--- PASS: TestAccGithubRepository_defaultBranch (12.70s)
--- PASS: TestAccGithubRepository_archive (12.79s)
--- PASS: TestAccGithubRepository_archiveUpdate (14.82s)
--- PASS: TestAccGithubRepository_createFromTemplate (17.30s)
--- PASS: TestAccGithubRepository_autoInitForceNew (30.04s)
--- PASS: TestAccGithubRepository_topics (33.02s)
Note: rolling this back as the param will override the |
Ah true. Would removing the default be enough? That should result in a nil setting. |
add visibility argument to github_repository data_source and resource
Adds the additional visibility parameter allowing for enterprise
accounts to set the repository to be only internally visible.
NOTE: This is dependant on #424 and should be rebased on master once this has been merged.