Search code examples
githubgithub-api

Programmatically enable GitHub Discussions for a repository


Is there a way to enable GitHub Discussions for a repository using the GitHub API? The only way to enable discussions that I could find is manually through the Settings page.


Solution

  • GitHub recently released the Discussions GraphQL API. The documentation for the API is available here.