Be a lot more flexible as for GHMemberChanges values #1821
Merged
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.
Unfortunately, things are not consistent between added and edited for the
member
event.added provide a permission of some sort and a role name (sometimes...) edited only provides permission and it's not exactly the same ones
For now, I think we need to return strings to avoid issues until GitHub adjusts the API.
@bitwiseman you were entirely right, it's a big mess. My tests didn't show it, I don't know exactly why, maybe it depends on the roles/repositories or if you are using GH or GH Enterprise.
I kept the backwards compatibility and did a translation that is as good as possible.
Unfortunately, I have a user who is blocked by this so if it makes sense to you and you think it goes in the right direction, I would appreciate it being merged and if you could release a new release (sorry I know it's annoying but this inconsistency is really problematic and it was hard to figure it out :/).