Compare package versions across branches and local installations
Source:R/package_branches.R
package_branches.RdFor 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")
)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.
Examples
if (FALSE) { # \dontrun{
package_branches()
package_branches(c("pipapi", "wbpip"))
package_branches(branch_to_compare = "QA")
} # }