Skip to contents

Whether gh has a token to send to GitHub: token itself, or the one that gh finds in the GITHUB_PAT or GITHUB_TOKEN environment variable or in the git credential store.

Usage

token_given(token)

Arguments

token

GitHub token, or NULL for the one that gh finds.

Value

TRUE or FALSE.

Examples

rghcard:::token_given("a token")
#> [1] TRUE
rghcard:::token_given("")
#> [1] FALSE