community
Creates, updates, deletes, gets or lists a community resource.
Overview
| Name | community |
| Type | Resource |
| Id | github.repos.community |
Fields
The following fields are returned by SELECT queries:
- get_community_profile_metrics
Response
| Name | Datatype | Description |
|---|---|---|
content_reports_enabled | boolean | |
description | string | (example: My first repository on GitHub!) |
documentation | string | (example: example.com) |
files | object | |
health_percentage | integer | |
updated_at | string (date-time) | (example: 2017-02-28T19:09:29Z) |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_community_profile_metrics | select | owner, repo | Returns all community profile metrics for a repository. The repository cannot be a fork. The returned metrics include an overall health score, the repository description, the presence of documentation, the detected code of conduct, the detected license, and the presence of ISSUE_TEMPLATE, PULL_REQUEST_TEMPLATE, README, and CONTRIBUTING files. The health_percentage score is defined as a percentage of how many ofthe recommended community health files are present. For more information, see "About community profiles for public repositories." content_reports_enabled is only returned for organization-owned repositories. |
Parameters
Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
| Name | Datatype | Description |
|---|---|---|
owner | string | The account owner of the repository. The name is not case sensitive. |
repo | string | The name of the repository without the .git extension. The name is not case sensitive. |
SELECT examples
- get_community_profile_metrics
Returns all community profile metrics for a repository. The repository cannot be a fork.
The returned metrics include an overall health score, the repository description, the presence of documentation, the
detected code of conduct, the detected license, and the presence of ISSUE_TEMPLATE, PULL_REQUEST_TEMPLATE,
README, and CONTRIBUTING files.
The health_percentage score is defined as a percentage of how many of
the recommended community health files are present. For more information, see
"About community profiles for public repositories."content_reports_enabled is only returned for organization-owned repositories.
SELECT
content_reports_enabled,
description,
documentation,
files,
health_percentage,
updated_at
FROM github.repos.community
WHERE owner = '{{ owner }}' -- required
AND repo = '{{ repo }}' -- required
;