merge_release | R Documentation |
Merge a pull request staged with stage_release()
and create a new release on GitHub.
merge_release(pkg = ".", filename = "NEWS.md", host = getOption("rdev.host"))
pkg |
path to package. Currently, only |
filename |
name of file containing release notes, defaults to |
host |
GitHub host to target, passed to the For a hypothetical GitHub Enterprise instance, either "https://github.acme.com/api/v3" or "https://github.acme.com" is acceptable. |
Manually verify that all status checks have completed before running, as merge_release()
doesn't currently validate that status checks are successful.
When run, merge_release()
:
Determines the staged release title from NEWS.md
using get_release()
Selects the GitHub pull request that matches the staged release title, stops if there is more
or less than one matching PR using gh::gh()
Verifies the staged pull request is ready to be merged by checking the locked, draft, mergeable, and rebaseable flags
Merges the pull request into the default branch using "Rebase and merge" using gh::gh()
Deletes the pull request branch remotely and locally using gh::gh()
and
gert::git_branch_delete()
Updates the default branch with gert::git_pull()
Adds the version tag to the DESCRIPTION
commit with the message "GitHub release <version>"
with gert::git_tag_create()
and pushes using gert::git_tag_push()
Create the GitHub release from the newly created tag, with the name "<version>"
and the
release notes in the body, using gh::gh()
list containing results of pull request merge and GitHub release, invisibly
Set the rdev.host
option when using a GitHub Enterprise server:
options(rdev.host = "https://github.example.com/api/v3")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.