Package 'githubContributors'

Title: Ordering authorships for R packages hosted on GitHub
Description: Easily obtain and order GitHub user contributions, which helps with ordering authorships for R packages.
Authors: Rémi Thériault [aut, cre] (<https://orcid.org/0000-0003-4315-6788>, @rempsyc)
Maintainer: Rémi Thériault <[email protected]>
License: MIT + file LICENSE
Version: 0.0.0.9000
Built: 2024-09-10 03:08:32 UTC
Source: https://github.com/rempsyc/githubContributors

Help Index


Get GitHub contributions

Description

Get GitHub contributions, which can then be ordered with order_authors().

Usage

get_contributions(repo, user = "easystats")

Arguments

repo

repository

user

username

Value

A data frame with username of contributor, number of added lines of code, deleted lines of code, and number of commits.

Source

https://stackoverflow.com/a/75277425/9370662

Examples

head(get_contributions("report"))

Order GitHub authors

Description

Order GitHub authors based on contributions (obtained from get_contributions()).

Usage

order_authors(data, commit.weight = 0, cutoff = 1000)

Arguments

data

data

commit.weight

A multiplication constant representing the weight the number of commits should have (setting it to 0, the default, will make it have no impact).

cutoff

Cutoff score under which to exclude contributors from the filtered list.

Value

A data frame with username of contributor, number of added lines of code, deleted lines of code, number of commits, and a total 'score' column representing the sum of the other columns.

Examples

x <- get_contributions("report")
order_authors(x)