-
Notifications
You must be signed in to change notification settings - Fork 56
Open
Description
Reading the /repos/{owner}/{repo}/actions/jobs/{job_id}/logs endpoint fails by default
library(gh)
gh("/repos/posit-dev/btw/actions/jobs/58155187713/logs")
#> Error in `file.copy()`:
#> ! file can not be copied both 'from' and 'to'
#> ▆
#> 1. └─gh::gh("/repos/posit-dev/btw/actions/jobs/58155187713/logs")
#> 2. └─gh:::gh_make_request(req)
#> 3. └─httr2::req_perform(req, path = x$desttmp)
#> 4. └─httr2:::cache_post_fetch(req, resp, path = path)
#> 5. └─httr2:::cache_set(req, resp)
#> 6. └─base::file.copy(resp$body, body_path, overwrite = TRUE)but works if you set the gh_cache option to FALSE
library(gh)
withr::with_options(list(gh_cache = FALSE), {
substr(gh("/repos/posit-dev/btw/actions/jobs/58155187713/logs"), 1, 38)
})
#> [1] "2025-12-16T03:05:32.1559690Z Current "Session Info
sessioninfo::session_info("gh")
#> ─ Session info ───────────────────────────────────────────────────────────────
#> setting value
#> version R version 4.5.2 (2025-10-31)
#> os macOS Tahoe 26.1
#> system aarch64, darwin20
#> ui X11
#> language (EN)
#> collate C.UTF-8
#> ctype C.UTF-8
#> tz America/New_York
#> date 2025-12-16
#> pandoc 3.6.4 @ /opt/homebrew/bin/ (via rmarkdown)
#> quarto 1.8.26 @ /Applications/quarto/bin/quarto
#>
#> ─ Packages ───────────────────────────────────────────────────────────────────
#> package * version date (UTC) lib source
#> askpass 1.2.1 2024-10-04 [1] CRAN (R 4.5.0)
#> cli 3.6.5 2025-04-23 [1] CRAN (R 4.5.0)
#> curl 7.0.0 2025-08-19 [1] CRAN (R 4.5.0)
#> gh * 1.5.0 2025-05-26 [1] CRAN (R 4.5.0)
#> gitcreds 0.1.2 2022-09-08 [1] CRAN (R 4.5.0)
#> glue 1.8.0 2024-09-30 [1] CRAN (R 4.5.0)
#> httr2 1.2.2 2025-12-08 [1] CRAN (R 4.5.2)
#> ini 0.3.1 2018-05-20 [1] CRAN (R 4.5.0)
#> jsonlite 2.0.0 2025-03-27 [1] CRAN (R 4.5.0)
#> lifecycle 1.0.4 2023-11-07 [1] CRAN (R 4.5.0)
#> magrittr 2.0.4 2025-09-12 [1] CRAN (R 4.5.0)
#> openssl 2.3.4 2025-09-30 [1] CRAN (R 4.5.0)
#> R6 2.6.1 2025-02-15 [1] CRAN (R 4.5.0)
#> rappdirs 0.3.3 2021-01-31 [1] CRAN (R 4.5.0)
#> rlang 1.1.6 2025-04-11 [1] CRAN (R 4.5.0)
#> sys 3.4.3 2024-10-04 [1] CRAN (R 4.5.0)
#> vctrs 0.6.5 2023-12-01 [1] CRAN (R 4.5.0)
#> withr 3.0.2 2024-10-28 [1] CRAN (R 4.5.0)
#>
#> [1] /Users/garrick/Library/R/arm64/4.5/library
#> [2] /Library/Frameworks/R.framework/Versions/4.5-arm64/Resources/library
#> * ── Packages attached to the search path.
#>
#> ──────────────────────────────────────────────────────────────────────────────Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels