Helpers for pull/merge request workflows
Description
The pr_*() family helps with common pull request (GitHub) and merge request (GitLab) workflows from a local Git repository.
These helpers are inspired by the usethis::pr_*() family and adapted for this package’s GitHub/GitLab support.
Usage
pr_init(branch)
pr_resume(branch = NULL)
pr_fetch(number, target = c("source", "primary"))
pr_push()
pr_pull()
pr_merge_main(target = c("source", "primary"))
pr_view(number = NULL, target = c("source", "primary"))
pr_pause(target = c("source", "primary"))
pr_finish(number = NULL, target = c("source", "primary"))
pr_forget()
Arguments
branch
|
Name of a branch. |
number
|
Pull/merge request number. |
target
|
Which remote should be treated as the destination repository? Use “source” (defaults to upstream when present, otherwise origin) or “primary” (always origin).
|
Details
Adapted from pull request helper concepts in the usethis package: https://github.com/r-lib/usethis/blob/main/R/pr.R (MIT License).