Retrieve repository metadata for documentation, inventory tracking, or automated workflows that need to enumerate organization repositories. Use this to generate up-to-date repository lists for README files, documentation sites, or CI/CD pipelines.
Returns a data.table with markdown-ready links and topics for easy inclusion in documentation.
Usage
get_repo_index(org = "artalytics", token = Sys.getenv("GITHUB_PAT"))Arguments
- org
Character. GitHub organization name to query (e.g.,
"artalytics","tidyverse","rstudio"). Defaults to"artalytics". Organization must exist and be accessible with the provided token. For private organizations, token must have appropriate access.- token
Character. GitHub Personal Access Token (format:
ghp_xxxxxxxxxxxx...). Defaults toGITHUB_PATenvironment variable. Token must havereposcope for private repositories, orpublic_reposcope for public-only access. Generate at https://github.com/settings/tokens. If token is invalid or expired, the API call will fail with an authentication error.
Value
A data.table with the following columns:
- repo_name
Character. The name of the repository.
- visibility
Character. The visibility of the repository ("public" or "private").
- description
Character. The repository description, or NA if none.
- repo_url
Character. The URL to the repository on GitHub.
- repo_md
Character. A markdown-formatted link to the repository.
- topics
List. Repository topics as a character vector (empty when none are set).
See also
Other dev-utils:
describe_env(),
dev-helpers,
list_art_packages()
