-
Notifications
You must be signed in to change notification settings - Fork 289
Lock and unlock branch as part of the release process #2145
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
This ensures that there's no way to accidentally forget that you're in the middle of the release process and make a change to the repo. Part of #1946
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the positioning makes sense based on what I remember about this
#' These functions lock and unlock a branch on GitHub so that it's not possible | ||
#' for anyone to make any changes. This is used as part of the release process | ||
#' to ensure that you don't accidentally merge any pull requests or push any | ||
#' commits while you are waiting for CRAN to get back to you. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Anything about permissions required to perform this action?
#' | ||
#' @export | ||
#' @param branch The branch to lock/unlock. If not supplied, uses the | ||
#' default branch with is usually "main" or "master". |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
#' default branch with is usually "main" or "master". | |
#' default branch which is usually "main" or "master". |
repo <- target_repo(cfg) | ||
branch <- branch %||% git_default_branch_(cfg) | ||
|
||
invisible(gh::gh( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What happens if you lock an already locked branch?
@@ -137,13 +138,15 @@ release_checklist <- function(version, on_cran, target_repo = NULL) { | |||
"", | |||
"Submit to CRAN:", | |||
"", | |||
todo("`usethis::gh_lock_branch()"), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
todo("`usethis::gh_lock_branch()"), | |
todo("`usethis::gh_lock_branch()`"), |
todo("`usethis::use_version('{type}')`"), | ||
todo("`devtools::submit_cran()`"), | ||
todo("Approve email"), | ||
"", | ||
"Wait for CRAN...", | ||
"", | ||
todo("Accepted :tada:"), | ||
todo("`usethis::gh_unlock_branch()"), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
todo("`usethis::gh_unlock_branch()"), | |
todo("`usethis::gh_unlock_branch()`"), |
This ensures that there's no way to accidentally forget that you're in the middle of the release process and make a change to the repo.
Part of #1946
@DavisVaughan it's been a long time since we discussed this, but does this make sense to you?
@jennybc mostly opening to start discussion; not planning to merge just yet.