feat: add ability to downgrade membership when github_membership is destroyed#1783
Merged
kfcampbell merged 10 commits intointegrations:mainfrom Jul 14, 2023
Merged
Conversation
kfcampbell
reviewed
Jul 10, 2023
kfcampbell
reviewed
Jul 10, 2023
Co-authored-by: Keegan Campbell <me@kfcampbell.com>
kfcampbell
approved these changes
Jul 14, 2023
jsifuentes
added a commit
to jsifuentes/terraform-provider-github
that referenced
this pull request
Jul 17, 2023
… destroyed (integrations#1783) * feat: add ability to downgrade membership on destroy * add docs * formatting * formatting * check membership status before downgrading * fix lint * fix lint * Update github/resource_github_membership.go Co-authored-by: Keegan Campbell <me@kfcampbell.com> --------- Co-authored-by: Keegan Campbell <me@kfcampbell.com>
felixlut
pushed a commit
to felixlut/terraform-provider-github
that referenced
this pull request
Jul 22, 2023
… destroyed (integrations#1783) * feat: add ability to downgrade membership on destroy * add docs * formatting * formatting * check membership status before downgrading * fix lint * fix lint * Update github/resource_github_membership.go Co-authored-by: Keegan Campbell <me@kfcampbell.com> --------- Co-authored-by: Keegan Campbell <me@kfcampbell.com>
avidspartan1
pushed a commit
to avidspartan1/terraform-provider-github
that referenced
this pull request
Feb 5, 2024
… destroyed (integrations#1783) * feat: add ability to downgrade membership on destroy * add docs * formatting * formatting * check membership status before downgrading * fix lint * fix lint * Update github/resource_github_membership.go Co-authored-by: Keegan Campbell <me@kfcampbell.com> --------- Co-authored-by: Keegan Campbell <me@kfcampbell.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Resolves #1782
Behavior
Before the change?
After the change?
downgrade_on_destroy = trueto agithub_membershipresource. Instead of revoking org membership, the membership role will be set to 'member' when the resource is destroyed.Additional info
testAccGithubMembershipConfigDowngradablesets the role toadminand sets thedowngrade_on_destroyto true. Since the Destroy no longer completely removes the membership during this test case, the membership is cleaned up during theCheckDestroy.Pull request checklist
Does this introduce a breaking change?
Please see our docs on breaking changes to help!
Type: Breaking changelabel)If
Yes, what's the impact:Pull request type
Type: Feature