These functions take you to various web pages associated with a project (here, usually a package) and return the target URL invisibly. To form these URLs we consult:

  • Git remotes configured for the active project that are associated with github.com

  • DESCRIPTION file for the active project or the specified package

  • Fixed templates:

    • Travis CI: https://travis-ci.{EXT}/{OWNER}/{PACKAGE}

    • Circle CI: https://circleci.com/gh/{OWNER}/{PACKAGE}

    • CRAN landing page: https://cran.r-project.org/package={PACKAGE}

    • GitHub mirror of a CRAN package: https://github.com/cran/{PACKAGE} Templated URLs aren't checked for existence, so there is no guarantee there will be content at the destination.

browse_github(package = NULL)

browse_github_issues(package = NULL, number = NULL)

browse_github_pulls(package = NULL, number = NULL)

browse_github_actions(package = NULL)

browse_travis(package = NULL, ext = c("com", "org"))

browse_circleci(package = NULL)

browse_cran(package = NULL)

Arguments

package

Name of package. If NULL, inferred from the active project.

number

Optional, to specify an individual GitHub issue or pull request. Can be a number or "new".

ext

Version of travis to use.

Details

  • browse_github(): Visits a GitHub repository associated with the project. In the case of a fork, you might be asked to specify if you're interested in the parent repo or your fork.

  • browse_github_issues(): Visits the GitHub Issues index or one specific issue.

  • browse_github_pulls(): Visits the GitHub Pull Request index or one specific pull request.

  • browse_travis(): Visits the project's page on Travis CI.

  • browse_circleci(): Visits the project's page on Circle CI.

  • browse_cran(): Visits the package on CRAN, via the canonical URL.

Examples

browse_github("gh")
#> Open URL 'https://github.com/r-lib/gh'
browse_github_issues("fs")
#> Open URL 'https://github.com/r-lib/fs/issues/'
browse_github_issues("fs", 1)
#> Open URL 'https://github.com/r-lib/fs/issues/1'
browse_github_pulls("curl")
#> Open URL 'https://github.com/jeroen/curl/pulls/'
browse_github_pulls("curl", 183)
#> Open URL 'https://github.com/jeroen/curl/pull/183'
browse_travis("gert", ext = "org")
#> Open URL 'https://travis-ci.org/r-lib/gert'
browse_cran("MASS")
#> Open URL 'https://cran.r-project.org/package=MASS'