-
Notifications
You must be signed in to change notification settings - Fork 754
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 issues with auto_init destroying repositories #317
Fix issues with auto_init destroying repositories #317
Conversation
d9fa07e
to
ec1d732
Compare
@majormoses would you mind resolving the merge conflicts? |
Sure, I have not bothered keeping it up to date since it was not getting any love from maintainers. |
ec1d732
to
cdfb104
Compare
From github API perspective setting or modifying `auto_init` only makes sense in the context of creating a new repository. Changing it after is ignored by the github API which is the behavior we should (and use to) match. The only scenario where this makes sense to assume that changing this intends on a destructive action (blowing up a github repo is not something that should be easy accidentally) is when you use the `terraform taint` command but for very different reasons. This change is related to several PRs that subverts the communities expectations with no real or perceived value. Signed-off-by: Ben Abrams <me@benabrams.it>
cdfb104
to
8e9ea3c
Compare
I think I got the tests working again but it looks like there are some unrelated errors: https://travis-ci.org/github/terraform-providers/terraform-provider-github/jobs/678001033#L497 |
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 for this PR @majormoses! just one suggestion but otherwise LGTM 👍
Output of acceptance tests:
--- PASS: TestAccGithubRepository_archive (8.14s)
--- PASS: TestAccGithubRepository_createFromTemplate (8.82s)
--- PASS: TestAccGithubRepository_templates (9.72s)
--- PASS: TestAccGithubRepository_hasProjects (11.15s)
--- PASS: TestAccGithubRepository_archiveUpdate (13.19s)
--- PASS: TestAccGithubRepository_basic (14.19s)
--- PASS: TestAccGithubRepository_defaultBranch (16.06s)
--- PASS: TestAccGithubRepository_topics (19.63s)
Thanks again for fixing this one @majormoses. Glad this annoyance has been removed. |
Happy to help, looking forward to ripping some hacks out of our modules 😀 |
From github API perspective setting or modifying
auto_init
only makes sense in the context of creating a new repository. Changing it after is ignored by the github API which is the behavior we should (and use to) match. The only scenario where this makes sense to assume that changing this intends on a destructive action (blowing up a github repo is not something that should be easy accidentally) is when you use theterraform taint
command but for very different reasons. This change is related to several PRs and issues that subverts the communities expectations with no real or perceived value.For further context please see #155 #154 https://github.com/sous-chefs/terraform-github-org/pull/111 #135
fixes #155
Signed-off-by: Ben Abrams me@benabrams.it