fledge
fledge copied to clipboard
Protected branches
finalize_version() currently pushes to the main branch. Can we come up with a good workflow to support protected branches, i.e. if we want to disallow pushing things straight to production?
Currently, bump_version() fails for non-main branch:
library(fledge)
with_demo_project(quiet = TRUE, {
usethis::use_r("bla")
gert::git_add("R/bla.R")
gert::git_commit("* Ad cool bla.")
gert::git_branch_create("bump")
bump_version()
})
#> Error in `check_main_branch()` at fledge/R/bump-version.R:6:2:
#> ! ✖ Must be on the main branch (main) for running fledge functions.
#> ℹ Currently on branch bump.
Created on 2022-05-12 by the reprex package (v2.0.1)
We also need #31.
It's worth finding out if we can create a setting where fledge can run in GHA (and is allowed to push) but the branch is otherwise protected.