Calculates the contributions of users to a project by counting the number of issues they opened, commented on, and closed.
compute_contribution(x, n = Inf)
# S3 method for class 'IssuesTB'
compute_contribution(x, n = Inf)
# Default S3 method
compute_contribution(x, n)A matrix of class ContributionsTB with users as columns
and contribution types (opened, commented, closed) as rows.
Each cell contains the count of contributions for that user and type.
issues_selector <- init_selector(
source = "Local",
dataset_dir = system.file("data_issues", package = "IssueTrackeR"),
dataset_name = NULL
)
my_issues <- get_issues(selector = issues_selector)
#> The issues will be read from /home/runner/work/_temp/Library/IssueTrackeR/data_issues/list_issues.yaml.
# Compute contributions for all users
contributions <- compute_contribution(my_issues)
# Compute contributions for top 5 users
top_contributions <- compute_contribution(my_issues, n = 5)