Skip to contents

This function assumes that you have admin push access to the GitHub organization indicated by org.

Usage

add_gh_release_branch(
  package_name,
  release = bioc_release_yaml(),
  gh_branch = .BIOC_DEFAULT_BRANCH,
  bioc_branch = .BIOC_DEFAULT_BRANCH,
  org = "Bioconductor",
  strategy = c("rebase", "merge")
)

add_gh_release_branches(
  packages = character(0L),
  release = bioc_release_yaml(),
  bioc_branch = .BIOC_DEFAULT_BRANCH,
  org = "Bioconductor",
  pause = 2,
  strategy = c("rebase", "merge")
)

bioc_version_yaml(config = .BIOC_CONFIG_FILE)

bioc_release_yaml(config = .BIOC_CONFIG_FILE)

Arguments

package_name

character(1) The name of the organization R package that is also available on GitHub.

release

character(1) The Bioconductor version branch tag, e.g., "RELEASE_3_17"

gh_branch

character(1) The name of the default branch on GitHub. It may be 'devel' or 'main' depending on the repository

bioc_branch

character(1) The name of the default branch on the Bioconductor git server (default 'devel')

org

character(1) The organization for which to extract the names of the repositories on GitHub (default "Bioconductor").

strategy

character(1) How to update the GitHub branch when it has diverged from the Bioconductor branch, e.g., GitHub-only commits and the Bioconductor version bumps made at release time. With "rebase" (default), the GitHub-only commits are replayed on top of the Bioconductor commits and the branch is force-pushed to GitHub (with --force-with-lease); a rebase with conflicts is aborted and stops, leaving the repository unchanged. With "merge", a merge commit is created. When the branches have not diverged, the update is a fast-forward and no merge commit is made with either strategy.

packages

named character() A character vector of default branches whose names correspond to Bioconductor package names. See packages_without_release_branch.

pause

numeric(1) The number of seconds to wait between packages (default 2). Spacing out the SSH connections avoids GitHub throttling them.

config

character(1) The path to the Bioconductor configuration file that contains the release version (defaults to website URL from .BIOC_CONFIG_FILE)

Details

Clone, pull, fetch, and push use the command-line git client with SSH connection and keep-alive timeouts, so a stalled connection fails instead of hanging. Failed operations are retried up to 3 times, with an increasing wait between attempts.

See also

packages_without_release_branch

Examples

if (interactive()) {
    bioc_version_yaml()
    bioc_release_yaml()

    gitcreds::gitcreds_set()
    ## gitcreds::gitcreds_get()

    add_gh_release_branch(
      package_name = "BiocParallel",
      release = bioc_release_yaml()
    )

    add_gh_release_branches(
        release = bioc_release_yaml(),
        org = "Bioconductor"
    )
}

if (interactive()) {
    gitcreds::gitcreds_set()
    add_gh_release_branches(
       release = "RELEASE_3_24"
    )
}