Code
library("pr.helpers")
pr_request_url(
"https://github.com/OWNER/REPO.git",
source_branch = "feature/new-thing",
target_branch = "main"
)[1] "https://github.com/OWNER/REPO/compare/main...feature%2Fnew-thing?expand=1"
Build a pull/merge request URL from a git remote
pr_request_url(remote_url, source_branch, target_branch)
remote_url
|
A git remote URL. |
source_branch
|
The source branch name. |
target_branch
|
The target branch name. |
A URL string that can be used to open a new pull request (GitHub) or merge request (GitLab).
library("pr.helpers")
pr_request_url(
"https://github.com/OWNER/REPO.git",
source_branch = "feature/new-thing",
target_branch = "main"
)[1] "https://github.com/OWNER/REPO/compare/main...feature%2Fnew-thing?expand=1"