Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make gitcreds code runnable #1975

Merged
merged 2 commits into from
Jul 24, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions R/github_token.R
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@

hint <- code_hint_with_host("gitcreds::gitcreds_set", host)
message <- c(
"_" = "Call {.code {hint}} to register this token in the local Git
"_" = "Call {.run {hint}} to register this token in the local Git

Check warning on line 71 in R/github_token.R

View check run for this annotation

Codecov / codecov/patch

R/github_token.R#L71

Added line #L71 was not covered by tests
credential store."
)
if (is_linux()) {
Expand Down Expand Up @@ -141,14 +141,14 @@

if (!have_pat) {
kv_line("Personal access token for {.val {host}}", NULL)
hint <- code_hint_with_host("create_github_token", host, "host")
hint <- code_hint_with_host("usethis::create_github_token", host, "host")

Check warning on line 144 in R/github_token.R

View check run for this annotation

Codecov / codecov/patch

R/github_token.R#L144

Added line #L144 was not covered by tests
ui_bullets(c(
"_" = "To create a personal access token, call {.code {hint}}."
"_" = "To create a personal access token, call {.run {hint}}."

Check warning on line 146 in R/github_token.R

View check run for this annotation

Codecov / codecov/patch

R/github_token.R#L146

Added line #L146 was not covered by tests
))
hint <- code_hint_with_host("gitcreds::gitcreds_set", host)
url <- "https://usethis.r-lib.org/articles/articles/git-credentials.html"
ui_bullets(c(
"_" = "To store a token for current and future use, call {.code {hint}}.",
"_" = "To store a token for current and future use, call {.run {hint}}.",

Check warning on line 151 in R/github_token.R

View check run for this annotation

Codecov / codecov/patch

R/github_token.R#L151

Added line #L151 was not covered by tests
"i" = "Read more in the {.href [Managing Git(Hub) Credentials]({url})} article."
))
return(invisible(FALSE))
Expand Down
Loading