github-community-projects / github-community-projects/safe-settings
Add support for repository `has_discussions`
- Dominant language
- JavaScript
- Stars
- 921
- Forks
- 226
- Avg merge
- 18h 3m
- Merged PRs (30d)
- 14
Description
## Prerequisites:
* Is the functionality available in the GitHub UI? If so, please provide a link to information about the feature.
The GitHub UI settings allows you toggle features including: Wikis, Issues, Discussions, and Projects.

* Is the functionality available through the GitHub API? If the functionality is available, please provide links to the
API documentation (https://developer.github.com/v3/) as well as the Octokit documentation (https://octokit.github.io/).
The [Create an organization repository](https://docs.github.com/en/rest/repos/repos?apiVersion=2022-11-28#create-an-organization-repository) endpoint has fields for `has_issues`, `has_projects`, `has_wiki`, and `has_downloads` but does not have a `has_discussions` field. However, [Create a repository for the authenticated user](https://docs.github.com/en/rest/repos/repos?apiVersion=2022-11-28#create-a-repository-for-the-authenticated-user) does.
`has_discussions` is returned from the [Get a repository](https://docs.github.com/en/rest/repos/repos?apiVersion=2022-11-28#get-a-repository) endpoint.
* If the functionality is not yet available in the API, it would be helpful if you
contacted support (https://support.github.com/) or posted in the Community Forum (https://github.community/). Please
include a link to the forum post if you create one or a copy of the response from support.
## New Feature
Please describe the desired new functionality:
It would be nice if Discussions could be programmatically enabled/disabled [in the `repository` settings, similar to `has_issues`, `has_projects`, and `has_wiki`](https://github.com/github/safe-settings/blob/28b3dfd7af72e14f0703b341668140ed577e80de/schema/dereferenced/settings.json#L82-L96).
It isn't immediately obvious to me whether Discussions are supported in the API, similar to the aforementioned options. Perhaps this is a known limitation and my attempts to search for previous issues failed me?
Contributor guide
Assessment
This issue has not been assessed yet.