Skip to main content

community

Creates, updates, deletes, gets or lists a community resource.

Overview

Namecommunity
TypeResource
Idgithub.repos.community

Fields

The following fields are returned by SELECT queries:

Response

NameDatatypeDescription
content_reports_enabledboolean
descriptionstring (example: My first repository on GitHub!)
documentationstring (example: example.com)
filesobject
health_percentageinteger
updated_atstring (date-time) (example: 2017-02-28T19:09:29Z)

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_community_profile_metricsselectowner, repoReturns 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.

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.

NameDatatypeDescription
ownerstringThe account owner of the repository. The name is not case sensitive.
repostringThe name of the repository without the .git extension. The name is not case sensitive.

SELECT examples

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
;