fledge icon indicating copy to clipboard operation
fledge copied to clipboard

Protected branches

Open krlmlr opened this issue 5 years ago • 3 comments

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?

krlmlr avatar Sep 30 '20 12:09 krlmlr

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.

krlmlr avatar May 12 '22 08:05 krlmlr

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.

krlmlr avatar Feb 04 '23 15:02 krlmlr