contributors
Creates, updates, deletes, gets or lists a contributors resource.
Overview
| Name | contributors |
| Type | Resource |
| Id | github.repos.contributors |
Fields
The following fields are returned by SELECT queries:
- list_contributors
If repository contains content
| Name | Datatype | Description |
|---|---|---|
id | integer | |
name | string | |
gravatar_id | string | |
node_id | string | |
avatar_url | string (uri) | |
contributions | integer | |
email | string | |
events_url | string | |
followers_url | string (uri) | |
following_url | string | |
gists_url | string | |
html_url | string (uri) | |
login | string | |
organizations_url | string (uri) | |
received_events_url | string (uri) | |
repos_url | string (uri) | |
site_admin | boolean | |
starred_url | string | |
subscriptions_url | string (uri) | |
type | string | |
url | string (uri) | |
user_view_type | string |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
list_contributors | select | owner, repo | anon, per_page, page | Lists contributors to the specified repository and sorts them by the number of commits per contributor in descending order. This endpoint may return information that is a few hours old because the GitHub REST API caches contributor data to improve performance. GitHub identifies contributors by author email address. This endpoint groups contribution counts by GitHub user, which includes all associated email addresses. To improve performance, only the first 500 author email addresses in the repository link to GitHub users. The rest will appear as anonymous contributors without associated GitHub user information. |
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. |
anon | string | Set to 1 or true to include anonymous contributors in results. |
page | integer | The page number of the results to fetch. For more information, see "Using pagination in the REST API." |
per_page | integer | The number of results per page (max 100). For more information, see "Using pagination in the REST API." |
SELECT examples
- list_contributors
Lists contributors to the specified repository and sorts them by the number of commits per contributor in descending order. This endpoint may return information that is a few hours old because the GitHub REST API caches contributor data to improve performance.
GitHub identifies contributors by author email address. This endpoint groups contribution counts by GitHub user, which includes all associated email addresses. To improve performance, only the first 500 author email addresses in the repository link to GitHub users. The rest will appear as anonymous contributors without associated GitHub user information.
SELECT
id,
name,
gravatar_id,
node_id,
avatar_url,
contributions,
email,
events_url,
followers_url,
following_url,
gists_url,
html_url,
login,
organizations_url,
received_events_url,
repos_url,
site_admin,
starred_url,
subscriptions_url,
type,
url,
user_view_type
FROM github.repos.contributors
WHERE owner = '{{ owner }}' -- required
AND repo = '{{ repo }}' -- required
AND anon = '{{ anon }}'
AND per_page = '{{ per_page }}'
AND page = '{{ page }}'
;