Skip to content

Publish an R Package to a Forgejo CRAN Registry

Upstream API documentation

Note: Installing a package usually requires authentication, as otherwise the whole organization must be set to ‘public’. To avoid hardcoding credentials and to make this process more seamless, a helper function, defined in .Rprofile on the repo level which accounts for this, is recommended.

publish_internal_r_package(
owner,
package_dir = ".",
forgejo_url = "https://codefloe.com",
token = Sys.getenv("FORGEJO_TOKEN"),
force = FALSE
)
Argument Description
owner The username or organization name in Forgejo.
package_dir Path to the root of the R package.
forgejo_url The base URL of your Forgejo instance.
token The API token. Defaults to FORGEJO_TOKEN environment variable.
force Whether to force upload/overwrite a package which already exists.