Skip to content

Event API docs for MemberEvent changes are incorrect #3378

@wayofthepie

Description

@wayofthepie

What article on docs.github.com is affected?

https://docs.github.com/en/developers/webhooks-and-events/github-event-types#memberevent

What part(s) of the article would you like to see updated?

The docs mention that the changes field in a MemberEvent is structured as changes[old_permission][from]. But in reality the changes field looks as follows for a webhook event of type edited:

"changes": {
    "permission": {
        "from": "triage",
        "to": "read"
    }
}

The key is permission not old_permission, and there is also a to field for the new permission. Note that this is also an issue in the webhook docs https://docs.github.com/en/developers/webhooks-and-events/webhook-events-and-payloads#member. Second to this, the field also appears when the event is type added, but the docs only mention its appearance in edited events. There is no from field when the event is type added, just a to field:

"changes": {
    "permission": {
        "to": "read"
    }
}

Maybe that should also be added to the docs? Thanks.

Metadata

Metadata

Assignees

No one assigned

    Labels

    contentThis issue or pull request belongs to the Docs Content teamecosystemThis issue or pull request should be reviewed by the Docs Ecosystem team

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions