Back to GithubSet 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.
Input
type: object
properties:
parameters:
type: object
properties:
owner:
type: string
description: The account owner of the repository. The name is not case sensitive.
repo:
type: string
description: The name of the repository. The name is not case sensitive.
required:
- owner
- repo
title: Parameters
data:
type: object
title: Data
properties:
limit:
type: string
description: >-
The type of GitHub user that can comment, open issues, or create pull
requests while the interaction limit is in effect.
example: collaborators_only
enum:
- existing_users
- contributors_only
- collaborators_only
expiry:
type: string
description: 'The duration of the interaction restriction. Default: `one_day`.'
example: one_month
enum:
- one_day
- three_days
- one_week
- one_month
- six_months
Output
type: object
title: Interaction Limits
properties:
limit:
type: string
description: >-
The type of GitHub user that can comment, open issues, or create pull
requests while the interaction limit is in effect.
example: collaborators_only
enum:
- existing_users
- contributors_only
- collaborators_only
origin:
type: string
example: repository
expires_at:
type: string
format: date-time
example: '2018-08-17T04:18:39.000Z'