The create API can also be used to modify the role #1276
Closed
+22
−5
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.
Reading the docs further on this action, the create endpoint can also be used for updating role.
I made an earlier edit here - #1216 - which works, we're no longer removing access, but the delete/create results in the user being sent two emails informing them they have been removed and added again.
The reason I get caught up on this isn't that I change membership a lot, but when a user gets Org-level Admin rights then the APIs start returning that they are a maintainer of the team, causing terraform to attempt to update them, triggering the emails.
We generally run without human admin accounts, bumping people up and down when needed, so there is noise generated by the code as it exists now.