Skip to content

Make repo_exists more specific #114

Description

@maelle

Currently, repo_exists will return FALSE if there's no repo with the same name for the account... but also if there's something wrong with the API.

repo_exists <- function(username, repo) {
  !inherits(
    try(gh::gh("GET /repos/:owner/:repo",
      owner = username,
      repo = repo
    ),
    silent = TRUE
    ),
    "try-error"
  )
}

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions