Skip to main content

contributors

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

Overview

Namecontributors
TypeResource
Idgithub.repos.contributors

Fields

The following fields are returned by SELECT queries:

If repository contains content

NameDatatypeDescription
idinteger
namestring
gravatar_idstring
node_idstring
avatar_urlstring (uri)
contributionsinteger
emailstring
events_urlstring
followers_urlstring (uri)
following_urlstring
gists_urlstring
html_urlstring (uri)
loginstring
organizations_urlstring (uri)
received_events_urlstring (uri)
repos_urlstring (uri)
site_adminboolean
starred_urlstring
subscriptions_urlstring (uri)
typestring
urlstring (uri)
user_view_typestring

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
list_contributorsselectowner, repoanon, per_page, pageLists 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.

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.
anonstringSet to 1 or true to include anonymous contributors in results.
pageintegerThe page number of the results to fetch. For more information, see "Using pagination in the REST API."
per_pageintegerThe number of results per page (max 100). For more information, see "Using pagination in the REST API."

SELECT examples

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 }}'
;