Title: | Acknowledge all Contributors to a Project |
---|---|
Description: | Acknowledge all contributors to a project via a single function call. The function appends to a 'README' or other specified file(s) a table with names of all individuals who contributed via code or repository issues. The package also includes several additional functions to extract and quantify contributions to any repository. |
Authors: | Mark Padgham [aut, cre], Chris Hartgerink [aut], Maƫlle Salmon [ctb] |
Maintainer: | Mark Padgham <[email protected]> |
License: | GPL-3 |
Version: | 0.2.2.008 |
Built: | 2024-12-24 01:23:11 UTC |
Source: | https://github.com/ropenscilabs/allcontributors |
Add contributors to README.Rmd
add_contributors( repo = ".", ncols = 7, files = c("README.Rmd", "README.md"), type = c("code", "issues", "discussion"), exclude_label = "wontfix", exclude_issues = NULL, exclude_not_planned = TRUE, num_sections = 3, section_names = c("Code", "Issue Authors", "Issue Contributors"), format = "grid", check_urls = TRUE, alphabetical = FALSE, open_issue = FALSE, force_update = FALSE )
add_contributors( repo = ".", ncols = 7, files = c("README.Rmd", "README.md"), type = c("code", "issues", "discussion"), exclude_label = "wontfix", exclude_issues = NULL, exclude_not_planned = TRUE, num_sections = 3, section_names = c("Code", "Issue Authors", "Issue Contributors"), format = "grid", check_urls = TRUE, alphabetical = FALSE, open_issue = FALSE, force_update = FALSE )
repo |
Vector of repository locations for which contributions are to be extracted. Each location must be a git project with a github remote. Default is single repository in current working directory. |
ncols |
Number of columns for contributors in 'README' |
files |
Names of files in which to add contributors |
type |
Type of contributions to include: 'code' for direct code contributions (including documentation), 'issues' to recognise contributors who open issues, and 'discussion' for contributing to discussions within issues. Discussion contributions are only from individuals not present in either 'issues' or 'code'; and 'issues' contributions are only from individuals not present in 'code'. |
exclude_label |
Exclude any contributions from issues with specified
label (default = "wontfix"; set to |
exclude_issues |
Numbers of any issues (or pull requests) to be excluded from lists of contributors. |
exclude_not_planned |
If |
num_sections |
Number of sections in which to divide contributors:
|
section_names |
Names of the sections to appear on the nominated
|
format |
One of ("grid", "list", "text") to control display of contributors as
|
check_urls |
If |
alphabetical |
If |
open_issue |
If |
force_update |
If |
Named list of logical values indicating whether files of given names were updated or not is returned invisibly (that is, only if explicitly assigned to a return value).
Opening an issue on github requires the github command-line interface to be locally installed. See https://cli.github.com/.
Other main:
get_contributors()
# The following code extracts the contributors from the git repository # associated with current working directory and writes them to a file. ## Not run: f <- tempfile (fileext = ".Rmd") writeLines ("", f) # blank file in tempdir() add_contributors (repo = ".", files = f) ## End(Not run)
# The following code extracts the contributors from the git repository # associated with current working directory and writes them to a file. ## Not run: f <- tempfile (fileext = ".Rmd") writeLines ("", f) # blank file in tempdir() add_contributors (repo = ".", files = f) ## End(Not run)
Get all contributors to a repository, including those who contribute to code, open issues, and contribute to discussions in issues.
get_contributors( org, repo, type = c("code", "issues", "discussion"), exclude_label = "wontfix", exclude_issues = NULL, exclude_not_planned = TRUE, alphabetical = FALSE, check_urls = TRUE, quiet = FALSE )
get_contributors( org, repo, type = c("code", "issues", "discussion"), exclude_label = "wontfix", exclude_issues = NULL, exclude_not_planned = TRUE, alphabetical = FALSE, check_urls = TRUE, quiet = FALSE )
org |
Github organisation name for repository |
repo |
Repository within |
type |
Type of contributions to include: 'code' for direct code contributions (including documentation), 'issues' to recognise contributors who open issues, and 'discussion' for contributing to discussions within issues. Discussion contributions are only from individuals not present in either 'issues' or 'code'; and 'issues' contributions are only from individuals not present in 'code'. |
exclude_label |
Exclude any contributions from issues with specified
label (default = "wontfix"; set to |
exclude_issues |
Numbers of any issues (or pull requests) to be excluded from lists of contributors. |
exclude_not_planned |
If |
alphabetical |
If |
check_urls |
If |
quiet |
If |
Other main:
add_contributors()
## Not run: get_contributors (org = "ropensci", repo = "allcontributors") ## End(Not run)
## Not run: get_contributors (org = "ropensci", repo = "allcontributors") ## End(Not run)
Get list of all code contributors to the code of a repository
get_gh_code_contributors(org, repo, alphabetical = FALSE)
get_gh_code_contributors(org, repo, alphabetical = FALSE)
org |
Github organisation name for repository |
repo |
Repository within |
alphabetical |
If |
A data.frame
of two columns of contributor (name, login)
Other github:
get_gh_contrib_issue()
,
get_gh_issue_people()
,
get_gh_issue_titles()
## Not run: get_gh_code_contributors (org = "ropensci", repo = "allcontributors") ## End(Not run)
## Not run: get_gh_code_contributors (org = "ropensci", repo = "allcontributors") ## End(Not run)
Extract contributors currently listed on an "All Contributions" issue in a github repository.
get_gh_contrib_issue(org, repo)
get_gh_contrib_issue(org, repo)
org |
Github organisation name for repository |
repo |
Repository within |
Character vector of github logins for all contributors listed in current issue, or empty character string if there no issue named "All Contributors".
Other github:
get_gh_code_contributors()
,
get_gh_issue_people()
,
get_gh_issue_titles()
## Not run: get_gh_contrib_issue (org = "ropensci", repo = "allcontributors") ## End(Not run)
## Not run: get_gh_contrib_issue (org = "ropensci", repo = "allcontributors") ## End(Not run)
Extract lists of (1) all authors of, and (2) all contributors to, all github issues for nominated repository, excluding issues closed as "not planned"
get_gh_issue_people( org, repo, exclude_issues = NULL, exclude_label = "wontfix", exclude_not_planned = TRUE )
get_gh_issue_people( org, repo, exclude_issues = NULL, exclude_label = "wontfix", exclude_not_planned = TRUE )
org |
Github organisation name for repository |
repo |
Repository within |
exclude_issues |
Numbers of any issues (or pull requests) to be excluded from lists of contributors. |
exclude_label |
Exclude any contributions from issues with specified
label (default = "wontfix"; set to |
exclude_not_planned |
If |
List of (authors, contributors), each as character vector of github login names.
Other github:
get_gh_code_contributors()
,
get_gh_contrib_issue()
,
get_gh_issue_titles()
## Not run: get_gh_issue_people (org = "ropensci", repo = "allcontributors") ## End(Not run)
## Not run: get_gh_issue_people (org = "ropensci", repo = "allcontributors") ## End(Not run)
Extract titles and numbers of all issues associated with a nominated repository
get_gh_issue_titles(org, repo)
get_gh_issue_titles(org, repo)
org |
Github organisation name for repository |
repo |
Repository within |
data.frame
with one column of issue numbers, and one column of
issue titles.
Other github:
get_gh_code_contributors()
,
get_gh_contrib_issue()
,
get_gh_issue_people()
## Not run: get_gh_issue_titles (org = "ropensci", repo = "allcontributors") ## End(Not run)
## Not run: get_gh_issue_titles (org = "ropensci", repo = "allcontributors") ## End(Not run)