Skip to main content
Ahora la API de REST tiene control de versiones. Para obtener más información, consulta "Acerca del control de versiones de la API".

Métricas de Community

Usa la API REST para recuperar información sobre el perfil de la comunidad.

Get community profile metrics

Funciona con GitHub Apps

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.

Parámetros para "Get community profile metrics"

Nombre, Tipo, Descripción
accept string

Setting to application/vnd.github+json is recommended.

Parámetros de la ruta de acceso
Nombre, Tipo, Descripción
owner string Requerido

The account owner of the repository. The name is not case sensitive.

repo string Requerido

The name of the repository without the .git extension. The name is not case sensitive.

Códigos de estado de respuesta HTTP para "Get community profile metrics"

status codeDescripción


Ejemplos de código para "Get community profile metrics"

curl -L \ -H "Accept: application/vnd.github+json" \ -H "Authorization: Bearer <YOUR-TOKEN>" \ -H "X-GitHub-Api-Version: 2022-11-28" \


Status: 200
{ "health_percentage": 100, "description": "My first repository on GitHub!", "documentation": null, "files": { "code_of_conduct": { "name": "Contributor Covenant", "key": "contributor_covenant", "url": "", "html_url": "" }, "code_of_conduct_file": { "url": "", "html_url": "" }, "contributing": { "url": "", "html_url": "" }, "issue_template": { "url": "", "html_url": "" }, "pull_request_template": { "url": "", "html_url": "" }, "license": { "name": "MIT License", "key": "mit", "spdx_id": "MIT", "url": "", "html_url": "", "node_id": "MDc6TGljZW5zZW1pdA==" }, "readme": { "url": "", "html_url": "" } }, "updated_at": "2017-02-28T19:09:29Z", "content_reports_enabled": true }