Set interaction restrictions for a repository
Temporarily restricts interactions to a certain type of GitHub user within the given repository. You must have owner or admin access to set these restrictions. If an interaction limit is set for the user or organization that owns this repository, you will receive a 409 Conflict response and will not be able to use this endpoint to change the interaction limit for a single repository.
Parameters
Section titled “ Parameters ”Path Parameters
Section titled “ Path Parameters ”The account owner of the repository. The name is not case sensitive.
The name of the repository without the .git extension. The name is not case sensitive.
Request Body required
Section titled “ Request Body required ”Limit interactions to a specific type of user for a specified duration
object
The type of GitHub user that can comment, open issues, or create pull requests while the interaction limit is in effect.
The duration of the interaction restriction. Default: one_day.
Examples
Example request body
{ "limit": "collaborators_only", "expiry": "one_day"}Responses
Section titled “ Responses ”Response
Interaction limit settings.
object
The type of GitHub user that can comment, open issues, or create pull requests while the interaction limit is in effect.
Examples
{ "limit": "collaborators_only", "origin": "repository", "expires_at": "2018-08-17T04:18:39Z"}Response