gh_open_PR_url: Build and open the compare URL GitHub renders as a PR page.

View source: R/gh.R

gh_open_PR_urlR Documentation

Build and open the compare URL GitHub renders as a PR page.

Description

gh_open_PR_url takes the owner, repo and branch you want to open a PR on, along with your owner name, repo and head branch you want to pull from, and opens github at the exact page you need.

Usage

gh_open_PR_url(
  head_branch = NULL,
  base_owner = "textmatelives",
  base_repo = "textmate",
  base_branch = "main",
  head_owner = "tbates",
  local_path = ".",
  browse = TRUE
)

Arguments

head_branch

Default NULL.

base_owner

Default "textmatelives".

base_repo

Default "textmate".

base_branch

Default "main".

head_owner

Default "tbates".

local_path

Default ".".

browse

Default TRUE.

Details

Before doing this, you want to

  1. Fork to your account

  2. Clone to your machine

  3. Move to preferred location

  4. Make a fix or feature branch and switch to it

  5. Edit, commit, push, repeat: success!

  6. Squash if necessary

  7. PR from your/branch to upstream/main

gh_open_PR_url solves #7: pull requesting

Value

  • url

References

https://tbates.github.io, tutorials

See Also

  • gh_feature_branch()

Other github: gh_feature_branch(), gh_message_search(), xgh_check_base_name(), xgh_get_current_branch()

Examples

## Not run: 
gh_open_PR_url(head_branch="fix", browse = FALSE)

## End(Not run)

umx documentation built on Oct. 11, 2026, 5:07 p.m.