Skip to content

Support reason in UsersService.Unsuspend #4613

Closed

Description

@JamBalaya56562

UsersService.Unsuspend cannot send a reason.

The GHES endpoint Unsuspend a user (DELETE /users/{username}/suspended) accepts an optional JSON body with a reason field, which is recorded in the audit log. UsersService.Unsuspend always sends nil, so callers can't provide one and GitHub logs the default "Unsuspended via API by SITE_ADMINISTRATOR".

UsersService.Suspend already supports this through UserSuspendOptions.Reason (added in #1112, being renamed to SuspendUserRequest in #4612), but Unsuspend was left out.

I'd like to add an UnsuspendUserRequest with a Reason field and pass it by value to Unsuspend, matching Suspend. I'm planning to work on this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions