Skip to contents

For each requested core PIP package, retrieves the DESCRIPTION version from every branch on GitHub and compares it with the locally installed version. Returns a list of tables showing version information, common branch versions, and a local status indicator (ahead/behind/up-to-date relative to a comparison branch).

Usage

package_branches(
  package = NULL,
  branch_to_compare = getOption("metapip.default_branch")
)

Arguments

package

Character vector. One or more core PIP package names. If `NULL` (default), all core packages are included.

branch_to_compare

Character scalar. Branch to use as the comparison baseline for the local status column. Defaults to `getOption("metapip.default_branch")`.

Value

A named list with three elements:

common

`data.frame` pivoted wide with columns for each of the common branches (`PROD`, `DEV_v2`, `QA`) and the package version on that branch.

local

`data.frame` with columns: `package`, `local_branch`, `local_version`, and `local_status` (one of `"behind <branch>"`, `"ahead of <branch>"`, `"up-to-date"`, `"Not in local"`, `"<branch> not in repo"`, `"<branch> version unknown"`).

*

One additional `data.frame` per package listing its non-common branches and their versions.

Progress

Shows a progress bar while fetching DESCRIPTION files from GitHub for every branch of every package.

See also

[core_metadata()], [get_branches()]

Examples

if (FALSE) { # \dontrun{
package_branches()
package_branches(c("pipapi", "wbpip"))
package_branches(branch_to_compare = "QA")
} # }