People with owner or admin access can temporarily restrict certain users from commenting, opening issues, or creating pull requests in your public repository to enforce a period of limited activity.

After 24 hours, users can resume normal activity in your repository.

Tip: Organization owners can enable organization-wide activity limitations. If organization-wide activity limitations are enabled, you can't limit activity for individual repositories. For more information, see "Limiting interactions in your organization."

  1. On GitHub, navigate to the main page of the repository.

  2. Under your repository name, click Settings. Repository settings button

  3. In your repository's Settings sidebar, click Interaction limits. Interaction limits in repository settings

  4. Under "Temporary interaction limits", click one or more options: Temporary interaction limit options
    • Limit to existing users: Limits activity for users with accounts that are less than 24 hours old who do not have prior contributions and are not collaborators.
    • Limit to prior contributors: Limits activity for users who have not previously contributed and are not collaborators.
    • Limit to repository collaborators Limits activity for users who are not collaborators.

Further reading