← Back
GitHub
GitHub adds repository-level control to disable comments on individual commits
GitHub · featureapi · github.blog ↗

New Commit Comment Control

Repository administrators now have fine-grained control over commit discussions with a new Allow comments on individual commits toggle in repository settings. This feature is enabled by default to maintain backward compatibility with existing repositories.

How It Works

When disabled, the feature:

  • Hides the comment interface: The comment form and inline diff comment affordances are removed from commit pages
  • Blocks API access: Comment creation is prevented through both REST and GraphQL APIs
  • Preserves existing comments: Already-posted commit comments remain visible, editable, and deletable

This granular approach allows maintainers to suppress unwanted discussion on specific commits while maintaining the integrity of existing conversations.

Implementation Details

The toggle can be accessed by navigating to your repository's Settings and scrolling to the "Commits" section. The default enabled state preserves existing behavior, ensuring no disruption to current workflows. Both web interface and programmatic comment submissions are blocked when disabled, providing consistent enforcement across all access methods.