This method will apply patches from corresponding GitHub branches for each R and Operating System combination. Changes will not be committed or pushed back to GitHub. The user will need to perform this action manually.
Usage
fix_snaps(
sha = git_sha(repo_dir),
...,
ask_apps = FALSE,
ask_branches = TRUE,
ask_if_not_main = TRUE,
repo_dir = rprojroot::find_package_root_file()
)
Arguments
- sha
git sha of base branch to look for
- ...
Extra arguments passed to
shinytest::viewTestDiff
- ask_apps, ask_branches
Logical which allows for particular apps or branches are to be inspected
- ask_if_not_main
Logical which will check if
main
is the base branch- repo_dir
Root repo folder path
Details
Note: This function will NOT fix shinyjster
failures.
Outline of steps performed:
Validate the current git branch is
main
Validate there are no git changes or untracked files in the current base branch
Validate there are
.new
_snaps filesCreate patch files for each corresponding
gha-
branch in./patches
Ask which branches should be applied. Filter patch files accordingly
Ask which app changes should be kept
Apply patch files
Call
accept_snaps()
on all app foldersUndo changes to app that were not selected
Prompt user to commit and push changes back to GitHub