Skip to main content

group_contributions

Gets or lists a group_contributions resource.

Overview​

Namegroup_contributions
TypeResource
Idgitlab.analytics.group_contributions

Fields​

The following fields are returned by SELECT queries:

GraphQL response envelope

NameDatatypeDescription
issues_closedintegerNumber of issues closed by the user.
issues_createdintegerNumber of issues created by the user.
merge_requests_approvedintegerNumber of merge requests approved by the user.
merge_requests_closedintegerNumber of merge requests closed by the user.
merge_requests_createdintegerNumber of merge requests created by the user.
merge_requests_mergedintegerNumber of merge requests merged by the user.
repo_pushedintegerNumber of repository pushes the user made.
total_eventsintegerTotal number of events contributed by the user.
userobjectUserCore identity (id, username, name)

Methods​

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
listselectfull_path, from_, to_, hostProvides the aggregated contributions by users within the group and its subgroups Generated from the GitLab GraphQL schema field Group.contributions (connection of ContributionAnalyticsContribution nodes).

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
from_stringStart date of the reporting time range.
full_pathstringFull path of the group, for example gitlab-org
hoststringGitLab host, with an optional port (default gitlab.com). Resolved from the GITLAB_HOST environment variable when it is set (x-stackQL-envVar); a WHERE host value always takes precedence. Self-managed instances: the provider is generated from the gitlab.com schema, so older instances may reject fields they do not serve. (default: gitlab.com, x-stackQL-envVar: GITLAB_HOST)
to_stringEnd date of the reporting time range. The end date must be within 93 days after the start date.

SELECT examples​

Provides the aggregated contributions by users within the group and its subgroups Generated from the GitLab GraphQL schema field Group.contributions (connection of ContributionAnalyticsContribution nodes).

SELECT
issues_closed,
issues_created,
merge_requests_approved,
merge_requests_closed,
merge_requests_created,
merge_requests_merged,
repo_pushed,
total_events,
user
FROM gitlab.analytics.group_contributions
WHERE full_path = '{{ full_path }}' -- required
AND from_ = '{{ from_ }}' -- required
AND to_ = '{{ to_ }}' -- required
AND host = '{{ host }}' -- required (defaults to gitlab.com; or set GITLAB_HOST)
;